wiki_md 0.8.11 → 0.8.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/wiki_md.rb +13 -4
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3de2fb382df101f3a2ab95635c5402d6beda2ceeaf245284f6a87e3c0613ec5e
|
4
|
+
data.tar.gz: a57ad3dcf9ac4b49be1c89ebd301b93b061ecaa84aa179147d2e92af2fcc9027
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8929be87b1efd95ce718dc0b63dd70ea2ddce15118387ac3ef0b88647e04a6240d833d209956f9a939ae022d6f09855d5ad0982b51e19a2c6da5c42032297d83
|
7
|
+
data.tar.gz: 85faa78e42136f5e586e3ee6ccb598c2144c4524d348240791b29b6dbb24b6c55c4b0156aa6c0db35612083d393b2f5c4e556fcaa9754fbf5a8c57419c5dd30d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/wiki_md.rb
CHANGED
@@ -176,12 +176,19 @@ class WikiMd
|
|
176
176
|
|
177
177
|
def create_section(s)
|
178
178
|
|
179
|
-
@active_heading = title = s[/(?<=^# )
|
179
|
+
@active_heading = title = s[/(?<=^# )[^#]+/].rstrip
|
180
180
|
|
181
181
|
tagline = s.rstrip.lines.last[/(?<=^\+\s).*/]
|
182
|
-
|
182
|
+
|
183
183
|
s2 = if tagline then
|
184
|
+
|
184
185
|
s
|
186
|
+
|
187
|
+
elsif tagline.nil? and s.lines.first[/(?<=# )[^#]+#/] then
|
188
|
+
|
189
|
+
tagline = s.lines.first[/(?<=# )[^#]+(.*)/].scan(/(?<=#)\w+/).join(' ')
|
190
|
+
'# ' + title + "\n" + s.lines[1..-1].join + "\n\n+ " + tagline
|
191
|
+
|
185
192
|
else
|
186
193
|
a = title.split
|
187
194
|
tagline = a.length > 1 ? a.map(&:capitalize).join : a.first
|
@@ -535,9 +542,11 @@ EOF
|
|
535
542
|
|
536
543
|
return false unless r
|
537
544
|
|
538
|
-
content = val =~ /# / ? val : r.x.lines.first + "\n" + val
|
545
|
+
content = (val =~ /# / ? val : r.x.lines.first + "\n" + val).rstrip
|
539
546
|
@active_heading = title = content.lines.first[/(?<=^# )[^#]+/].rstrip
|
540
547
|
|
548
|
+
puts 'content: ' + content.inspect if @debug
|
549
|
+
|
541
550
|
if content.lines.last[/^\+/] then
|
542
551
|
tagline1 = content.lines.last[/^\+\s+(.*)/,1]
|
543
552
|
else
|
@@ -551,7 +560,7 @@ EOF
|
|
551
560
|
|
552
561
|
puts 'tagline1: ' + tagline1.inspect if @debug
|
553
562
|
|
554
|
-
s2 = if tagline1 then
|
563
|
+
s2 = if tagline1 and tagline1.length > 0 then
|
555
564
|
content
|
556
565
|
else
|
557
566
|
a = title.split
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wiki_md
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
N5hZmnA6M2h3NysLCPRtwS2vMJh8qq6OS5RjU9cc5V08vyIkQ7/YC/x+7kLm5Kn0
|
36
36
|
kvoWXxa8gpUBS+qMlSYFDHlq
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-04-
|
38
|
+
date: 2020-04-21 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dxsectionx
|
metadata.gz.sig
CHANGED
Binary file
|