livetext 0.9.27 → 0.9.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.lt3 +3 -2
  3. data/imports/bookish.rb +1 -1
  4. data/lib/livetext/expansion.rb +108 -0
  5. data/lib/livetext/formatter.rb +223 -0
  6. data/lib/livetext/functions.rb +9 -0
  7. data/lib/livetext/helpers.rb +41 -29
  8. data/lib/livetext/html.rb +73 -0
  9. data/lib/livetext/more.rb +33 -13
  10. data/lib/livetext/parser/general.rb +1 -1
  11. data/lib/livetext/parser/set.rb +10 -3
  12. data/lib/livetext/processor.rb +5 -0
  13. data/lib/livetext/standard.rb +67 -67
  14. data/lib/livetext/userapi.rb +41 -19
  15. data/lib/livetext/version.rb +1 -1
  16. data/lib/livetext.rb +1 -1
  17. data/plugin/bookish.rb +1 -1
  18. data/plugin/bootstrap_menu.rb +140 -0
  19. data/plugin/misc/navbar.rb +162 -0
  20. data/test/extra/README.txt +149 -0
  21. data/test/extra/bracketed.rb +121 -0
  22. data/test/extra/bracketed.txt +44 -0
  23. data/test/extra/double.rb +121 -0
  24. data/test/extra/double.txt +44 -0
  25. data/test/extra/functions.rb +148 -0
  26. data/test/extra/functions.txt +58 -0
  27. data/test/extra/single.rb +139 -0
  28. data/test/extra/single.txt +52 -0
  29. data/test/extra/testgen.rb +104 -0
  30. data/test/extra/variables.rb +94 -0
  31. data/test/extra/variables.txt +35 -0
  32. data/test/snapshots/basic_formatting/expected-output.txt +2 -2
  33. data/test/snapshots/simple_vars/source.lt3 +1 -1
  34. data/test/snapshots/subset.txt +49 -49
  35. data/test/unit/all.rb +1 -2
  36. data/test/unit/parser/general.rb +2 -2
  37. data/test/unit/parser/set.rb +0 -9
  38. metadata +18 -34
  39. data/lib/livetext/funcall.rb +0 -87
  40. data/lib/livetext/lineparser.rb +0 -575
  41. data/test/snapshots/basic_formatting/actual-error.txt +0 -0
  42. data/test/snapshots/basic_formatting/actual-output.txt +0 -13
  43. data/test/snapshots/basic_formatting/err-sdiff.txt +0 -1
  44. data/test/snapshots/basic_formatting/out-sdiff.txt +0 -14
  45. data/test/snapshots/error_inc_line_num/README.txt +0 -20
  46. data/test/snapshots/error_invalid_name/foo +0 -5
  47. data/test/snapshots/functions/actual-error.txt +0 -19
  48. data/test/snapshots/functions/actual-output.txt +0 -0
  49. data/test/snapshots/functions/err-sdiff.txt +0 -20
  50. data/test/snapshots/more_complex_vars/actual-error.txt +0 -0
  51. data/test/snapshots/more_complex_vars/actual-output.txt +0 -4
  52. data/test/snapshots/more_complex_vars/err-sdiff.txt +0 -1
  53. data/test/snapshots/more_complex_vars/out-sdiff.txt +0 -5
  54. data/test/snapshots/more_functions/actual-error.txt +0 -19
  55. data/test/snapshots/more_functions/actual-output.txt +0 -0
  56. data/test/snapshots/more_functions/err-sdiff.txt +0 -20
  57. data/test/snapshots/raw_lines/actual-error.txt +0 -22
  58. data/test/snapshots/raw_lines/actual-output.txt +0 -0
  59. data/test/snapshots/raw_lines/err-sdiff.txt +0 -23
  60. data/test/snapshots/simple_vars/actual-error.txt +0 -0
  61. data/test/snapshots/simple_vars/actual-output.txt +0 -6
  62. data/test/snapshots/simple_vars/err-sdiff.txt +0 -1
  63. data/test/snapshots/simple_vars/out-sdiff.txt +0 -7
  64. data/test/snapshots/var_into_func/actual-error.txt +0 -19
  65. data/test/snapshots/var_into_func/actual-output.txt +0 -0
  66. data/test/snapshots/var_into_func/err-sdiff.txt +0 -20
  67. data/test/snapshots/var_into_func/out-sdiff.txt +0 -17
  68. data/test/unit/lineparser.rb +0 -359
  69. data/test/unit/new_lineparser.rb +0 -359
  70. data/test/unit/tokenizer.rb +0 -535
@@ -53,8 +53,9 @@ class Livetext::ParseSet < StringParser
53
53
  var = get_var
54
54
  skip_equal
55
55
  value = get_value
56
- value = Livetext.interpolate(value)
56
+ # value = Livetext.interpolate(value)
57
57
  pair = [var, value]
58
+ Livetext::Vars[var.to_sym] = value
58
59
  pair
59
60
  end
60
61
 
@@ -115,10 +116,11 @@ class Livetext::ParseSet < StringParser
115
116
  end
116
117
 
117
118
  def unquoted_value
118
- char = nil
119
119
  value = ""
120
+ char = nil
120
121
  loop do
121
122
  char = peek
123
+ break if char.nil?
122
124
  break if eos?
123
125
  break if char == " " || char == ","
124
126
  value << char
@@ -133,7 +135,12 @@ class Livetext::ParseSet < StringParser
133
135
 
134
136
  def get_value
135
137
  char = peek
136
- value = quote?(char) ? quoted_value : unquoted_value
138
+ flag = quote?(char)
139
+ if flag
140
+ value = quoted_value
141
+ else
142
+ value = unquoted_value
143
+ end
137
144
  value
138
145
  end
139
146
  end
@@ -35,12 +35,17 @@ class Processor
35
35
  @indentation = @parent.indentation
36
36
  @_mixins = []
37
37
  @_imports = []
38
+ @html = HTML.new(@parent.api)
38
39
  end
39
40
 
40
41
  def api
41
42
  @parent.api # FIXME Is this weird??
42
43
  end
43
44
 
45
+ def html
46
+ @html
47
+ end
48
+
44
49
  def output=(io)
45
50
  @output = io
46
51
  end
@@ -17,6 +17,8 @@ module Livetext::Standard
17
17
  include HTMLHelper
18
18
  include Livetext::Helpers
19
19
 
20
+ TTY = ::File.open("/dev/tty", "w")
21
+
20
22
  SimpleFormats = # Move this?
21
23
  { b: %w[<b> </b>],
22
24
  i: %w[<i> </i>],
@@ -25,18 +27,9 @@ module Livetext::Standard
25
27
 
26
28
  attr_reader :data
27
29
 
28
- def data=(val) # FIXME this is weird, let's remove it soonish and why are there two???
29
- # api.tty ">>>> in #{__FILE__}: api id = #{api.object_id}"
30
- val = val.chomp
31
- api.data = val
32
- api.args = format(val).split rescue []
33
- @mixins = []
34
- @imports = []
35
- end
36
-
37
30
  # dumb name - bold, italic, teletype, striketrough
38
31
 
39
- def bits(args = nil, body = nil) # FIXME umm what is this?
32
+ def bits # FIXME umm what is this?
40
33
  b0, b1, i0, i1, t0, t1, s0, s1 = *api.args
41
34
  SimpleFormats[:b] = [b0, b1]
42
35
  SimpleFormats[:i] = [i0, i1]
@@ -45,29 +38,35 @@ module Livetext::Standard
45
38
  api.optional_blank_line
46
39
  end
47
40
 
48
- def backtrace(args = nil, body = nil)
41
+ # def setvars(pairs)
42
+ # pairs.each do |var, value|
43
+ # api.setvar(var, value)
44
+ # end
45
+ # end
46
+
47
+ def backtrace
49
48
  @backtrace = onoff(api.args.first)
50
49
  api.optional_blank_line
51
50
  end
52
51
 
53
- def comment(args = nil, body = nil)
52
+ def comment
54
53
  api.body
55
54
  api.optional_blank_line
56
55
  end
57
56
 
58
- def shell(args = nil, body = nil)
57
+ def shell
59
58
  cmd = api.data
60
59
  system(cmd)
61
60
  api.optional_blank_line
62
61
  end
63
62
 
64
- def func(args = nil, body = nil)
63
+ def func
65
64
  funcname = api.args[0]
66
65
  # check_disallowed(funcname) # should any be invalid?
67
66
  funcname = funcname.gsub(/\./, "__")
68
67
  func_def = <<~EOS
69
68
  def #{funcname}(param)
70
- #{api.body.to_a.join("\n")}
69
+ #{api.body(true).to_a.join("\n")}
71
70
  end
72
71
  EOS
73
72
  api.optional_blank_line
@@ -75,21 +74,21 @@ module Livetext::Standard
75
74
  return true
76
75
  end
77
76
 
78
- def h1(args = nil, body = nil); api.out wrapped(api.data, :h1); return true; end
79
- def h2(args = nil, body = nil); api.out wrapped(api.data, :h2); return true; end
80
- def h3(args = nil, body = nil); api.out wrapped(api.data, :h3); return true; end
81
- def h4(args = nil, body = nil); api.out wrapped(api.data, :h4); return true; end
82
- def h5(args = nil, body = nil); api.out wrapped(api.data, :h5); return true; end
83
- def h6(args = nil, body = nil); api.out wrapped(api.data, :h6); return true; end
77
+ def h1; api.out wrapped(api.data, :h1); return true; end
78
+ def h2; api.out wrapped(api.data, :h2); return true; end
79
+ def h3; api.out wrapped(api.data, :h3); return true; end
80
+ def h4; api.out wrapped(api.data, :h4); return true; end
81
+ def h5; api.out wrapped(api.data, :h5); return true; end
82
+ def h6; api.out wrapped(api.data, :h6); return true; end
84
83
 
85
- def list(args = nil, body = nil)
84
+ def list
86
85
  wrap :ul do
87
86
  api.body {|line| api.out wrapped(line, :li) }
88
87
  end
89
88
  api.optional_blank_line
90
89
  end
91
90
 
92
- def list!(args = nil, body = nil)
91
+ def list!
93
92
  wrap(:ul) do
94
93
  lines = api.body.each # enumerator
95
94
  loop do
@@ -102,40 +101,40 @@ module Livetext::Standard
102
101
  api.optional_blank_line
103
102
  end
104
103
 
105
- def shell!(args = nil, body = nil)
104
+ def shell!
106
105
  cmd = api.data
107
106
  system(cmd)
108
107
  api.optional_blank_line
109
108
  end
110
109
 
111
- def errout(args = nil, body = nil)
110
+ def errout
112
111
  ::STDERR.puts api.data
113
112
  api.optional_blank_line
114
113
  end
115
114
 
116
- def ttyout(args = nil, body = nil)
115
+ def ttyout
117
116
  TTY.puts api.data
118
117
  api.optional_blank_line
119
118
  end
120
119
 
121
- def say(args = nil, body = nil)
120
+ def say
122
121
  str = api.format(api.data)
123
122
  TTY.puts str
124
123
  api.optional_blank_line
125
124
  end
126
125
 
127
- def banner(args = nil, body = nil)
126
+ def banner
128
127
  str = api.format(api.data)
129
128
  num = str.length
130
129
  decor = "-"*num + "\n"
131
130
  puts decor + str + "\n" + decor
132
131
  end
133
132
 
134
- def quit(args = nil, body = nil)
133
+ def quit
135
134
  @output.close
136
135
  end
137
136
 
138
- def cleanup(args = nil, body = nil)
137
+ def cleanup
139
138
  api.args.each do |item|
140
139
  cmd = ::File.directory?(item) ? "rm -f #{item}/*" : "rm #{item}"
141
140
  system(cmd)
@@ -143,13 +142,9 @@ module Livetext::Standard
143
142
  api.optional_blank_line
144
143
  end
145
144
 
146
- def dot_def(args = nil, body = nil)
147
- # api.tty "in #{__FILE__}: api id = #{api.inspect}"
145
+ def dot_def
148
146
  name = api.args[0]
149
- # api.tty :dd1
150
- # api.tty name.inspect
151
147
  check_disallowed(name)
152
- # api.tty :dd2
153
148
  # Difficult to avoid eval here
154
149
  str = "def #{name}\n"
155
150
  str << api.body(true).join("\n")
@@ -158,16 +153,16 @@ module Livetext::Standard
158
153
  api.optional_blank_line
159
154
  end
160
155
 
161
- def set(args = nil, body = nil)
162
- line = api.data.chomp
156
+ def set
157
+ line = api.args.join(" ") # data.chomp
163
158
  pairs = Livetext::ParseSet.new(line).parse
164
- set_variables(pairs)
159
+ api.setvars(pairs)
165
160
  api.optional_blank_line
166
161
  end
167
162
 
168
163
  # FIXME really these should be one method...
169
164
 
170
- def variables!(args = nil, body = nil) # cwd, not FileDir - weird, fix later
165
+ def variables! # cwd, not FileDir - weird, fix later
171
166
  prefix = api.args[0]
172
167
  file = api.args[1]
173
168
  prefix = nil if prefix == "-" # FIXME dumb hack
@@ -178,11 +173,12 @@ module Livetext::Standard
178
173
  lines = api.body
179
174
  end
180
175
  pairs = Livetext::ParseGeneral.parse_vars(lines, prefix: nil)
181
- set_variables(pairs)
176
+ STDERR.puts "! pairs = #{pairs.inspect}"
177
+ api.setvars(pairs)
182
178
  api.optional_blank_line
183
179
  end
184
180
 
185
- def variables(args = nil, body = nil)
181
+ def variables
186
182
  prefix = api.args[0]
187
183
  file = api.args[1]
188
184
  prefix = nil if prefix == "-" # FIXME dumb hack
@@ -193,11 +189,12 @@ module Livetext::Standard
193
189
  lines = api.body
194
190
  end
195
191
  pairs = Livetext::ParseGeneral.parse_vars(lines, prefix: nil)
196
- set_variables(pairs)
192
+ STDERR.puts "pairs = #{pairs.inspect}"
193
+ api.setvars(pairs)
197
194
  api.optional_blank_line
198
195
  end
199
196
 
200
- def heredoc(args = nil, body = nil)
197
+ def heredoc
201
198
  var = api.args[0]
202
199
  text = api.body.join("\n")
203
200
  rhs = ""
@@ -211,7 +208,7 @@ module Livetext::Standard
211
208
  api.optional_blank_line
212
209
  end
213
210
 
214
- def seek(args = nil, body = nil) # like include, but search upward as needed
211
+ def seek # like include, but search upward as needed
215
212
  file = api.args.first
216
213
  file = search_upward(file)
217
214
  check_file_exists(file)
@@ -219,14 +216,14 @@ module Livetext::Standard
219
216
  api.optional_blank_line
220
217
  end
221
218
 
222
- def dot_include(args = nil, body = nil) # dot command
223
- file = api.format(api.args.first) # allows for variables
219
+ def dot_include # dot command
220
+ file = api.args.first # api.format(api.args.first) # allows for variables
224
221
  check_file_exists(file)
225
222
  @parent.process_file(file)
226
223
  api.optional_blank_line
227
224
  end
228
225
 
229
- def inherit(args = nil, body = nil)
226
+ def inherit
230
227
  file = api.args.first
231
228
  upper = "../#{file}"
232
229
  got_upper, got_file = File.exist?(upper), File.exist?(file)
@@ -238,8 +235,9 @@ module Livetext::Standard
238
235
  api.optional_blank_line
239
236
  end
240
237
 
241
- def mixin(args = nil, body = nil)
238
+ def mixin
242
239
  name = api.args.first # Expect a module name
240
+ @mixins ||= []
243
241
  return if @mixins.include?(name)
244
242
  @mixins << name
245
243
  mod = Livetext::Handler::Mixin.get_module(name, @parent)
@@ -249,8 +247,9 @@ module Livetext::Standard
249
247
  api.optional_blank_line
250
248
  end
251
249
 
252
- def import(args = nil, body = nil)
250
+ def import
253
251
  name = api.args.first # Expect a module name
252
+ @imports ||= []
254
253
  return if @imports.include?(name)
255
254
  @imports << name
256
255
  mod = Livetext::Handler::Import.get_module(name, @parent)
@@ -260,7 +259,7 @@ module Livetext::Standard
260
259
  api.optional_blank_line
261
260
  end
262
261
 
263
- def copy(args = nil, body = nil)
262
+ def copy
264
263
  file = api.args.first
265
264
  ok = check_file_exists(file)
266
265
 
@@ -270,65 +269,67 @@ module Livetext::Standard
270
269
  [ok, file]
271
270
  end
272
271
 
273
- def r(args = nil, body = nil)
274
- api.out api.data # No processing at all
272
+ def r
273
+ # FIXME api.data is broken
274
+ # api.out api.data # No processing at all
275
+ api.out api.args.join(" ")
275
276
  api.optional_blank_line
276
277
  end
277
278
 
278
- def raw(args = nil, body = nil)
279
+ def raw
279
280
  # No processing at all (terminate with __EOF__)
280
281
  api.raw_body {|line| api.out line } # no formatting
281
282
  api.optional_blank_line
282
283
  end
283
284
 
284
- def debug(args = nil, body = nil)
285
+ def debug
285
286
  self._debug = onoff(api.args.first)
286
287
  api.optional_blank_line
287
288
  end
288
289
 
289
- def passthru(args = nil, body = nil)
290
+ def passthru
290
291
  # FIXME - add check for args size? (helpers)
291
292
  @nopass = ! onoff(api.args.first)
292
293
  api.optional_blank_line
293
294
  end
294
295
 
295
- def nopass(args = nil, body = nil)
296
+ def nopass
296
297
  @nopass = true
297
298
  api.optional_blank_line
298
299
  end
299
300
 
300
- def para(args = nil, body = nil)
301
+ def para
301
302
  # FIXME - add check for args size? (helpers)
302
303
  @nopara = ! onoff(api.args.first)
303
304
  api.optional_blank_line
304
305
  end
305
306
 
306
- def nopara(args = nil, body = nil)
307
+ def nopara
307
308
  @nopara = true
308
309
  api.optional_blank_line
309
310
  end
310
311
 
311
- def heading(args = nil, body = nil)
312
+ def heading
312
313
  api.print "<center><font size=+1><b>"
313
314
  api.print api.data
314
315
  api.print "</b></font></center>"
315
316
  api.optional_blank_line
316
317
  end
317
318
 
318
- def newpage(args = nil, body = nil)
319
+ def newpage
319
320
  api.out '<p style="page-break-after:always;"></p>'
320
321
  api.out "<p/>"
321
322
  api.optional_blank_line
322
323
  end
323
324
 
324
- def mono(args = nil, body = nil)
325
+ def mono
325
326
  wrap ":pre" do
326
327
  api.body(true) {|line| api.out line }
327
328
  end
328
329
  api.optional_blank_line
329
330
  end
330
331
 
331
- def dlist(args = nil, body = nil)
332
+ def dlist
332
333
  delim = api.args.first
333
334
  wrap(:dl) do
334
335
  api.body do |line|
@@ -341,15 +342,14 @@ module Livetext::Standard
341
342
  api.optional_blank_line
342
343
  end
343
344
 
344
- def link(args = nil, body = nil)
345
+ def link
345
346
  url = api.args.first
346
347
  text = api.args[2..-1].join(" ")
347
348
  api.out "<a style='text-decoration: none' href='#{url}'>#{text}</a>"
348
349
  api.optional_blank_line
349
350
  end
350
351
 
351
- def xtable(args = nil, body = nil) # Borrowed from bookish - FIXME
352
- # TTY.puts "=== #{__method__} #{__FILE__} #{__LINE__}"
352
+ def xtable # Borrowed from bookish - FIXME
353
353
  title = api.data
354
354
  delim = " :: "
355
355
  api.out "<br><center><table width=90% cellpadding=5>"
@@ -379,13 +379,13 @@ module Livetext::Standard
379
379
  api.optional_blank_line
380
380
  end
381
381
 
382
- def image(args = nil, body = nil)
382
+ def image
383
383
  name = api.args[0]
384
384
  api.out "<img src='#{name}'></img>"
385
385
  api.optional_blank_line
386
386
  end
387
387
 
388
- def br(args = nil, body = nil)
388
+ def br
389
389
  num = api.args.first || "1"
390
390
  str = ""
391
391
  num.to_i.times { str << "<br>" }
@@ -1,5 +1,5 @@
1
-
2
- require_relative 'lineparser' # FIXME meh, because of #format
1
+ require_relative 'expansion'
2
+ require_relative 'html'
3
3
 
4
4
  # Encapsulate the UserAPI as a class
5
5
 
@@ -15,18 +15,31 @@ class Livetext::UserAPI
15
15
  def initialize(live)
16
16
  @live = live
17
17
  @vars = live.vars
18
+ @html = HTML.new(self)
19
+ @expander = Livetext::Expansion.new(live)
18
20
  end
19
21
 
20
22
  def api
21
23
  @live.api
22
24
  end
23
25
 
26
+ def html
27
+ @html
28
+ end
29
+
24
30
  def dot
25
31
  @live
26
32
  end
27
33
 
28
- def setvar(var, val)
29
- Livetext::Vars[var] = val # Now indifferent and "safe"
34
+ def setvar(var, val) # FIXME
35
+ @live.vars.set(var, val)
36
+ end
37
+
38
+ def setvars(pairs)
39
+ pairs = pairs.to_a if pairs.is_a?(Hash)
40
+ pairs.each do |var, value|
41
+ @live.vars.set(var, value)
42
+ end
30
43
  end
31
44
 
32
45
  def check_existence(file, msg)
@@ -34,9 +47,13 @@ class Livetext::UserAPI
34
47
  end
35
48
 
36
49
  def data=(value)
37
- # TTY.puts "in #{__FILE__}: api = #{@live.api.inspect}"
38
- @data = value
39
- @args = format(@data).chomp.split
50
+ @data = value.dup
51
+ # @args = format(@data).chomp.split
52
+ @data
53
+ end
54
+
55
+ def data
56
+ @data
40
57
  end
41
58
 
42
59
  def args
@@ -44,9 +61,9 @@ class Livetext::UserAPI
44
61
  @args.each {|arg| yield arg }
45
62
  end
46
63
 
47
- def vars
48
- @vars
49
- end
64
+ def vars
65
+ @vars
66
+ end
50
67
 
51
68
  def optional_blank_line
52
69
  peek = @live.peek_nextline # ???
@@ -93,7 +110,7 @@ class Livetext::UserAPI
93
110
  break if end?(@line)
94
111
  next if comment?(@line)
95
112
  @line = format(@line) unless raw
96
- lines << @line
113
+ lines << @line
97
114
  end
98
115
  raise "Expected .end, found end of file" unless end?(@line) # use custom exception
99
116
  optional_blank_line # FIXME Delete this??
@@ -118,22 +135,27 @@ class Livetext::UserAPI
118
135
  end
119
136
 
120
137
  def format(line)
121
- return "" if line == "\n" || line.nil?
122
- line2 = Livetext::LineParser.parse!(line)
138
+ line2 = @expander.format(line)
123
139
  line2
124
140
  end
125
141
 
126
142
  def passthru(line)
127
143
  return if @live.nopass
128
- out "<p>" if line == "\n" and ! @live.nopara
129
- line = format(line)
130
- out line
144
+ if line == "\n"
145
+ unless @live.nopara
146
+ out "<p>"
147
+ out
148
+ end
149
+ else
150
+ text = @expander.format(line.chomp)
151
+ out text
152
+ end
131
153
  end
132
154
 
133
155
  def out(str = "", file = nil)
134
156
  return if str.nil?
135
157
  return file.puts str unless file.nil?
136
- @live.body << str
158
+ @live.body << str
137
159
  @live.body << "\n" unless str.end_with?("\n")
138
160
  end
139
161
 
@@ -150,11 +172,11 @@ class Livetext::UserAPI
150
172
  end
151
173
 
152
174
  def puts(*args)
153
- @live.output.puts *args
175
+ @live.output.puts *args
154
176
  end
155
177
 
156
178
  def print(*args)
157
- @live.output.print *args
179
+ @live.output.print *args
158
180
  end
159
181
 
160
182
  def debug=(val)
@@ -2,5 +2,5 @@
2
2
  # Defining VERSION
3
3
 
4
4
  class Livetext
5
- VERSION = "0.9.27"
5
+ VERSION = "0.9.32"
6
6
  end
data/lib/livetext.rb CHANGED
@@ -9,7 +9,7 @@ require_relative 'livetext/errors'
9
9
  require_relative 'livetext/standard'
10
10
  require_relative 'livetext/functions'
11
11
  require_relative 'livetext/userapi'
12
- require_relative 'livetext/lineparser'
12
+ require_relative 'livetext/formatter'
13
13
  require_relative 'livetext/processor'
14
14
  require_relative 'livetext/helpers'
15
15
  require_relative 'livetext/handler'
data/plugin/bookish.rb CHANGED
@@ -173,7 +173,7 @@ def simple_table(args = nil, body = nil)
173
173
  lines = api.body(true)
174
174
  maxw = nil
175
175
  lines.each do |line|
176
- api.format(line)
176
+ # api.format(line)
177
177
  cells = line.split(delim)
178
178
  wide = cells.map {|x| x.length }
179
179
  maxw = [0] * cells.size