mindmap_mfm 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/mindmap_mfm.rb +34 -20
- metadata +43 -39
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 98240ecc59dc134545c3f7cdac85be48acc37d2126aa15b52a06b23d57259607
|
4
|
+
data.tar.gz: a590a5230cfb55774b61a6edeff0cfc7fdf48bb6e5724c8cf510ad3ab70d4322
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3877c8dbf15bba9b1072666ac9b592cc5dcebcab7f61eaafb17db421191381f52a4e6b8dcc79b196ab464bc23ec3e197c10c6a57a8ddb21a305c9702d383b076
|
7
|
+
data.tar.gz: 533aa3f21897dbf10ad8cc08c30e2e284f58cc2b264e442091de681bfe94529ca0e892210811ba8102fffb68cb09ca7f48c4188edb1c5a6abaa7a6e7df3fd59a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/mindmap_mfm.rb
CHANGED
@@ -10,9 +10,11 @@ require 'html-to-css'
|
|
10
10
|
|
11
11
|
|
12
12
|
class MindmapMFM
|
13
|
+
using ColouredText
|
13
14
|
|
14
|
-
def initialize(s)
|
15
|
+
def initialize(s, debug: false)
|
15
16
|
|
17
|
+
@debug = debug
|
16
18
|
@rawdoc = build_rawdoc(s)
|
17
19
|
@html = Kramdown::Document.new(@rawdoc).to_html
|
18
20
|
|
@@ -63,29 +65,41 @@ EOF
|
|
63
65
|
|
64
66
|
|
65
67
|
a = s.split(/(?=__DATA__)/,2)
|
66
|
-
|
67
|
-
|
68
|
-
|
68
|
+
|
69
|
+
body = if a.length > 1 then
|
70
|
+
|
71
|
+
a2 = a.first.split(/(?=!s)/,2)
|
72
|
+
svg = a2[1].lines.first
|
73
|
+
txtdoc = a2[1].lines[1..-1].join
|
74
|
+
|
75
|
+
divdoc = if txtdoc[0] != '<' then
|
76
|
+
actual_txtdoc, below_txtdoc = txtdoc.split(/-{10,}/,2)
|
77
|
+
'<div markdown="1">' + actual_txtdoc \
|
78
|
+
+ "</div>\n<div style='clear: both'/>\n" + below_txtdoc
|
79
|
+
else
|
80
|
+
txtdoc
|
81
|
+
end
|
82
|
+
|
83
|
+
[
|
84
|
+
a2[0],
|
85
|
+
svg,
|
86
|
+
"\n\n", divdoc,
|
87
|
+
].join
|
69
88
|
|
70
|
-
divdoc = if txtdoc[0] != '<' then
|
71
|
-
actual_txtdoc, below_txtdoc = txtdoc.split(/-{10,}/,2)
|
72
|
-
'<div markdown="1">' + actual_txtdoc \
|
73
|
-
+ "</div>\n<div style='clear: both'/>\n" + below_txtdoc
|
74
89
|
else
|
75
|
-
|
90
|
+
s
|
76
91
|
end
|
92
|
+
puts ('body: ' + body.inspect).debug if @debug
|
93
|
+
html = [
|
94
|
+
"<html>\n",
|
95
|
+
head,
|
96
|
+
"\n <body markdown='1'>\n\n",
|
97
|
+
body, "\n</body>\n</html>\n\n"
|
98
|
+
]
|
99
|
+
html << a.last if a.length > 1
|
77
100
|
|
78
|
-
html
|
79
|
-
|
80
|
-
head,
|
81
|
-
"\n <body markdown='1'>\n\n",
|
82
|
-
a2[0],
|
83
|
-
svg,
|
84
|
-
"\n\n", divdoc, "\n</body>\n</html>\n\n",
|
85
|
-
a.last
|
86
|
-
].join
|
87
|
-
|
88
|
-
Martile.new(html).to_s
|
101
|
+
puts ('html: ' + html.inspect) if @debug
|
102
|
+
Martile.new(html.join, debug: @debug).to_s
|
89
103
|
|
90
104
|
end
|
91
105
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mindmap_mfm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,27 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwMzA0MjIyMDM2WhcN
|
15
|
+
MjAwMzAzMjIyMDM2WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDSHCeu
|
17
|
+
JDtZssxoggTSKtTAwopnZq6vBG6oHlqoiMwQuo816aDPxlNsKUBQLo2vrG25o7jv
|
18
|
+
Y4u3xB2BYU3SGLU0N8fQ1p7jfaLXTzQB2zmslCreJAL46zKGAduTQzGPsoBhfA6z
|
19
|
+
SdM3PUiRnoolD+UFokNOJGeWidHIx62ogep0WG+mWejM7WfkMWImqXcfHO6uG0+f
|
20
|
+
VjJbie09s89KXifiOP+z3vGrDsQfjNEtylOw/3+GRZtMjQCX0SzhptBf48QQs1YI
|
21
|
+
q6M2njxSkQ0uA877r27s3RU2TAKTiSDR1CJYiRzDj+QYbIorXwWd/A/AbdSl8eIU
|
22
|
+
5+W1j9BGJV6X34iLb8h4gO6HOhXON4peqj+muuiYzV0lt5F+twRGKXPmHK+qFbSu
|
23
|
+
o9vaqcr2jV4bGbWSjK6Fbn6c9/CVoi2eps9V37ZpboanC8A8dzuQ0GneZR5lAuAC
|
24
|
+
uz+VYRSXelnKeKwifHTBptMzmCACEXo7PSa2aNETI7LXkqIm/KNwVvT2nyECAwEA
|
25
|
+
AaOBijCBhzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUpC2fdXIz
|
26
|
+
0lU7YtLTERiaAuCL3OUwJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
|
27
|
+
c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
|
28
|
+
BgkqhkiG9w0BAQsFAAOCAYEAVvjEKRTwlOMnbd8ZK12iRJPUHb2+o/icGtC4snpi
|
29
|
+
H+nrBEf7Ixv3m4aQr/UV0IAT297t6nffXA6DP0CpAegFB8f89uGRhspfewDcYeWy
|
30
|
+
aPZuw92PIRfUs4eA7k8Kemk5tG8oQoaZWy1zYAPE38rJ+eNXoWVXzkkXvhUBzy80
|
31
|
+
UbxQyZo5UlPyS3UshXb0PAKbKjgSIjN2I4uGJGcaUWXqlyR1eOUe3KR0c1wQBPEa
|
32
|
+
LiI8iaT+Ff7N/T86TGHtv+3gbPxlDz6k2v6TTczynDqoFdvwTjt6a3OE+K2tfXsk
|
33
|
+
6r2gHODQjEbrxLZK8csmkNTlgH6JUp+1rySMAWR+JbonvhJ7D/rww/ZisddM9dbc
|
34
|
+
b7w0UEmI81tYkpicvNSoGiAma0RLNF6UEUfQx+k1K0mhgMa+HXmOZv1Z4iXtLqRy
|
35
|
+
kt2QNYYgUi8zg4M1dWd577TMf7qbsXx3pUrE4deIsdMMFYf2/yN2/d47911IieWl
|
36
|
+
LuePKi4Rlu2mLxsfnRgVS2D5
|
32
37
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
38
|
+
date: 2019-03-04 00:00:00.000000000 Z
|
34
39
|
dependencies:
|
35
40
|
- !ruby/object:Gem::Dependency
|
36
41
|
name: martile
|
@@ -38,60 +43,60 @@ dependencies:
|
|
38
43
|
requirements:
|
39
44
|
- - "~>"
|
40
45
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
46
|
+
version: '1.1'
|
42
47
|
- - ">="
|
43
48
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
49
|
+
version: 1.1.7
|
45
50
|
type: :runtime
|
46
51
|
prerelease: false
|
47
52
|
version_requirements: !ruby/object:Gem::Requirement
|
48
53
|
requirements:
|
49
54
|
- - "~>"
|
50
55
|
- !ruby/object:Gem::Version
|
51
|
-
version: '
|
56
|
+
version: '1.1'
|
52
57
|
- - ">="
|
53
58
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
59
|
+
version: 1.1.7
|
55
60
|
- !ruby/object:Gem::Dependency
|
56
61
|
name: mindmapdoc
|
57
62
|
requirement: !ruby/object:Gem::Requirement
|
58
63
|
requirements:
|
59
64
|
- - "~>"
|
60
65
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
66
|
+
version: '0.3'
|
62
67
|
- - ">="
|
63
68
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
69
|
+
version: 0.3.4
|
65
70
|
type: :runtime
|
66
71
|
prerelease: false
|
67
72
|
version_requirements: !ruby/object:Gem::Requirement
|
68
73
|
requirements:
|
69
74
|
- - "~>"
|
70
75
|
- !ruby/object:Gem::Version
|
71
|
-
version: '0.
|
76
|
+
version: '0.3'
|
72
77
|
- - ">="
|
73
78
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
79
|
+
version: 0.3.4
|
75
80
|
- !ruby/object:Gem::Dependency
|
76
81
|
name: kramdown
|
77
82
|
requirement: !ruby/object:Gem::Requirement
|
78
83
|
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '1.16'
|
82
84
|
- - ">="
|
83
85
|
- !ruby/object:Gem::Version
|
84
|
-
version: 1.
|
86
|
+
version: 2.1.0
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.1'
|
85
90
|
type: :runtime
|
86
91
|
prerelease: false
|
87
92
|
version_requirements: !ruby/object:Gem::Requirement
|
88
93
|
requirements:
|
89
|
-
- - "~>"
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
version: '1.16'
|
92
94
|
- - ">="
|
93
95
|
- !ruby/object:Gem::Version
|
94
|
-
version: 1.
|
96
|
+
version: 2.1.0
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '2.1'
|
95
100
|
- !ruby/object:Gem::Dependency
|
96
101
|
name: html-to-css
|
97
102
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
143
|
- !ruby/object:Gem::Version
|
139
144
|
version: '0'
|
140
145
|
requirements: []
|
141
|
-
|
142
|
-
rubygems_version: 2.6.13
|
146
|
+
rubygems_version: 3.0.1
|
143
147
|
signing_key:
|
144
148
|
specification_version: 4
|
145
149
|
summary: Generates HTML with an embedded SVG hyperlinked mindmap along with associated
|
metadata.gz.sig
CHANGED
Binary file
|