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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6f0a51a746d7fdb6a78c7c47a5b63ece78eda9a4
4
- data.tar.gz: 75f2ff0b85d66aafad44e4977fb015038f7a7053
2
+ SHA256:
3
+ metadata.gz: 98240ecc59dc134545c3f7cdac85be48acc37d2126aa15b52a06b23d57259607
4
+ data.tar.gz: a590a5230cfb55774b61a6edeff0cfc7fdf48bb6e5724c8cf510ad3ab70d4322
5
5
  SHA512:
6
- metadata.gz: a136db1f82b2063a65f2031976ece3505248dd740d291c54baf13cecde64598f6419582d02989a200f0357922e3582b6b1c3962239a591a84074ece554a79d5c
7
- data.tar.gz: c0b2188207f7516c574f0677618b6b8eb0fae05dd798b276077bd03256ca81cf3111e8ceb5eb9f97101f302826b04fed6f10240557c51a5a6c517a88a970a70f
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
- a2 = a.first.split(/(?=!s)/,2)
67
- svg = a2[1].lines.first
68
- txtdoc = a2[1].lines[1..-1].join
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
- txtdoc
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
- "<html>\n",
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.2.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
- MIIDXjCCAkagAwIBAgIBATANBgk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Z2VtbWFzdGVyQGphbWVzcm9iZXJ0
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: 2018-02-09 00:00:00.000000000 Z
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: '0.8'
46
+ version: '1.1'
42
47
  - - ">="
43
48
  - !ruby/object:Gem::Version
44
- version: 0.8.1
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: '0.8'
56
+ version: '1.1'
52
57
  - - ">="
53
58
  - !ruby/object:Gem::Version
54
- version: 0.8.1
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.1'
66
+ version: '0.3'
62
67
  - - ">="
63
68
  - !ruby/object:Gem::Version
64
- version: 0.1.2
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.1'
76
+ version: '0.3'
72
77
  - - ">="
73
78
  - !ruby/object:Gem::Version
74
- version: 0.1.2
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.16.2
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.16.2
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
- rubyforge_project:
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