livetext 0.9.04 → 0.9.05
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/livetext.rb +1 -1
- data/lib/userapi.rb +1 -1
- data/plugin/bookish.rb +30 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20018f4ffc0706839f4d17412fd107ed9525b6c0958d29fa3e52dd4be8e6eb36
|
4
|
+
data.tar.gz: f3805cf9788faf459c3abd3b5145d16d806802e641d432a4d0045180115a8ea1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 559f0f7ef52b6b09d47c20577b2febd3ccfdd125d647deb91b71947b5ce9531fa12156889c2f58ea7cad88666aa332eb91cafd58a071fcd2380e88e2e7482274
|
7
|
+
data.tar.gz: 5f658b46c63d9fdc5b4786ff9f5b9be9cf2bb85e2c2215348b65f0e717af65fc20e8351dea7168765e9149c3f6c0c5ec5c632e20cd90fac4da9bc6d5974eb319
|
data/lib/livetext.rb
CHANGED
data/lib/userapi.rb
CHANGED
data/plugin/bookish.rb
CHANGED
@@ -12,6 +12,7 @@ def credit
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def h1; _out "<h1>#{@_data}</h1>"; end
|
15
|
+
def h2; _out "<h2>#{@_data}</h2>"; end
|
15
16
|
def h3; _out "<h3>#{@_data}</h3>"; end
|
16
17
|
|
17
18
|
def list
|
@@ -118,11 +119,11 @@ def sec
|
|
118
119
|
@sec += 1
|
119
120
|
@sec2 = 0
|
120
121
|
@section = "#@chapter.#@sec"
|
121
|
-
|
122
|
-
@toc << "#{_nbsp(3)}<b>#@section</b>
|
122
|
+
title = @_data.dup
|
123
|
+
@toc << "#{_nbsp(3)}<b>#@section</b> #{title}<br>"
|
123
124
|
@_data = _slug(@_data)
|
124
125
|
next_output
|
125
|
-
_out "<h3>#@section #{
|
126
|
+
_out "<h3>#@section #{title}</h3>\n"
|
126
127
|
rescue => err
|
127
128
|
STDERR.puts "#{err}\n#{err.backtrace}"
|
128
129
|
exit
|
@@ -131,11 +132,33 @@ end
|
|
131
132
|
def subsec
|
132
133
|
@sec2 += 1
|
133
134
|
@subsec = "#@chapter.#@sec.#@sec2"
|
134
|
-
|
135
|
-
#
|
135
|
+
title = @_data.dup
|
136
|
+
@toc << "#{_nbsp(6)}<b>#@subsec</b> #{title}<br>"
|
136
137
|
@_data = _slug(@_data)
|
137
138
|
next_output
|
138
|
-
_out "<h3>#@subsec #{
|
139
|
+
_out "<h3>#@subsec #{title}</h3>\n"
|
140
|
+
end
|
141
|
+
|
142
|
+
def definition_table
|
143
|
+
title = @_data
|
144
|
+
wide = "95"
|
145
|
+
delim = " :: "
|
146
|
+
_out "<br><center><table width=#{wide}% cellpadding=5>"
|
147
|
+
lines = _body(true)
|
148
|
+
lines.map! {|line| _format(line) }
|
149
|
+
|
150
|
+
lines.each do |line|
|
151
|
+
cells = line.split(delim)
|
152
|
+
_out "<tr>"
|
153
|
+
cells.each.with_index do |cell, i|
|
154
|
+
width = (i == 0) ? "width=15%" : ""
|
155
|
+
_out " <td #{width} valign=top>#{cell}</td>"
|
156
|
+
end
|
157
|
+
_out "</tr>"
|
158
|
+
end
|
159
|
+
_out "</table></center><br><br>"
|
160
|
+
|
161
|
+
_optional_blank_line
|
139
162
|
end
|
140
163
|
|
141
164
|
def table2
|
@@ -204,7 +227,7 @@ def table
|
|
204
227
|
cells = line.split(delim)
|
205
228
|
wide = cells.map {|x| x.length }
|
206
229
|
maxw = [0] * cells.size
|
207
|
-
maxw = maxw.map.with_index {|x, i| [x, wide[i]].max }
|
230
|
+
maxw = maxw.map.with_index {|x, i| [x, wide[i]+2].max }
|
208
231
|
end
|
209
232
|
|
210
233
|
sum = maxw.inject(0, :+)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livetext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.05
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A smart text processor extensible in Ruby
|
14
14
|
email: rubyhacker@gmail.com
|