about summary refs log tree commit diff stats
path: root/source_file.lua
diff options
context:
space:
mode:
Diffstat (limited to 'source_file.lua')
-rw-r--r--source_file.lua20
1 files changed, 2 insertions, 18 deletions
diff --git a/source_file.lua b/source_file.lua
index 194ef9b..3adab1f 100644
--- a/source_file.lua
+++ b/source_file.lua
@@ -1,7 +1,5 @@
 -- primitives for saving to file and loading from file
 
-Fold = '\x1e'  -- ASCII RS (record separator)
-
 function file_exists(filename)
   local infile = App.open_for_reading(filename)
   if infile then
@@ -28,13 +26,7 @@ function load_from_file(infile)
       if line == '```lines' then  -- inflexible with whitespace since these files are always autogenerated
         table.insert(result, load_drawing(infile_next_line))
       else
-        local line_info = {mode='text'}
-        if line:find(Fold) then
-          _, _, line_info.data, line_info.dataB = line:find('([^'..Fold..']*)'..Fold..'([^'..Fold..']*)')
-        else
-          line_info.data = line
-        end
-        table.insert(result, line_info)
+        table.insert(result, {mode='text', data=line})
       end
     end
   end
@@ -54,10 +46,6 @@ function save_to_disk(State)
       store_drawing(outfile, line)
     else
       outfile:write(line.data)
-      if line.dataB and #line.dataB > 0 then
-        outfile:write(Fold)
-        outfile:write(line.dataB)
-      end
       outfile:write('\n')
     end
   end
@@ -147,11 +135,7 @@ function load_array(a)
     else
 --?       print('inserting text')
       local line_info = {mode='text'}
-      if line:find(Fold) then
-        _, _, line_info.data, line_info.dataB = line:find('([^'..Fold..']*)'..Fold..'([^'..Fold..']*)')
-      else
-        line_info.data = line
-      end
+      line_info.data = line
       table.insert(result, line_info)
     end
   end
b15a9e9663b1a7ee11d39ddf246427aecaeef'>^
1b492df ^
26c50c7 ^
6078d75 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                            
                                            
d31b5ad96b0ba7b5b0a30928fcf000428339a577 0.1
0a6472e2203994bc5738d40a340d26f7ec9d6062 0.2
7e66082e5092fb0bccd18a3695a0bec52c80fdb2 0.3
eb3165734f00fe7f7da8aeebaed00e60a57caac9 0.4
22213b9a2114167ee8ba019a012e27da0422a61a 0.5
c11f86db4550cac5d0a648a3fe4d6d3b9a4fcf7e 0.6
3fb41412e2492f66476d92ce8f007a8b48fb1d2a 0.7
cd15de32e173f8ce97bfe1c9b6607937b59056b4 0.8
fae61afa861755636c4a1070694209ace8efbb6c 0.9
bbc98e77ae89a7c9232a5be0835f60ea00d8036e 1.0
44a55e6e46bf6c231780b09d919977d6f01083de 1.1
e3179ce2b90451d2807cd53b589d768412b8666b 1.2
f5f5cbf016a94b48a8fe9c47f0736e96d166d5d4 1.3
3cff9403766bf83a9fc2a0aef230115d68de2a8e 1.4