wiki_md 0.4.0 → 0.4.1
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 +3 -3
- 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: a314fa02253872441fd68c16c6d8158745401fe6e58ef5fdd8657421a88577e9
|
4
|
+
data.tar.gz: b4f20db2f094e64b9b43a7fbcf2eefb6b040f9b60b7382da94ba930272b7caff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f9bf04cb1e0ec4daa637148acdea9158e8d078684dfa7d7e6338144e07b32da4e4ff16ace51d1e1ae349f19dd15f58ad00fb617b90489467e42fea8d5b05ad4
|
7
|
+
data.tar.gz: 0dc5efff3dcfb9380ed01e9018a4d5a045b4f7311050bc90021e7d6e173105a33df12d1443c34c8c1a72da75043573c551cd51eca272e7c58f3a3799e5d68adf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/wiki_md.rb
CHANGED
@@ -49,14 +49,19 @@ class WikiMd
|
|
49
49
|
|
50
50
|
@active_heading = title = s[/(?<=^# ).*/]
|
51
51
|
|
52
|
-
|
53
|
-
tag = a.length > 1 ? a.map(&:capitalize).join : a.first
|
52
|
+
tagline = s.rstrip.lines.last[/(?<=^\+\s).*/]
|
54
53
|
|
55
|
-
s2 =
|
54
|
+
s2 = if tagline then
|
55
|
+
s
|
56
|
+
else
|
57
|
+
a = title.split
|
58
|
+
tagline = a.length > 1 ? a.map(&:capitalize).join : a.first
|
59
|
+
s + "\n\n+ " + tagline
|
60
|
+
end
|
56
61
|
|
57
62
|
@dxsx.create(x: s2)
|
58
63
|
|
59
|
-
@dx.create title: title + ' #' +
|
64
|
+
@dx.create title: title + ' #' + tagline.lstrip.split.join(' #'),
|
60
65
|
url: [@base_url, File.basename(@filename)[/.*(?=\.\w+)/],
|
61
66
|
URI.escape(title)].join('/')
|
62
67
|
FileX.write @filename, @dxsx.to_s if @filename
|
@@ -88,6 +93,10 @@ class WikiMd
|
|
88
93
|
heading2 = r.x.lines.last[/(?<=redirect ).*/]
|
89
94
|
heading2 ? find(heading2) : r
|
90
95
|
|
96
|
+
end
|
97
|
+
|
98
|
+
def find_tag(tag)
|
99
|
+
@dxtags.find tag
|
91
100
|
end
|
92
101
|
|
93
102
|
def headings()
|
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.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
version: '0.3'
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.3.
|
69
|
+
version: 0.3.1
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0.3'
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: 0.3.
|
79
|
+
version: 0.3.1
|
80
80
|
description:
|
81
81
|
email: james@jamesrobertson.eu
|
82
82
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|