martile 1.5.0 → 1.6.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
2
  SHA256:
3
- metadata.gz: 18c6765c2caf1958e7ced7e78348e16fc3368e1f87854c822a45ecbfc66b9b10
4
- data.tar.gz: 81b3ae3967ad9604521bf18723f4adf4894e7d26d2d6e0f7d8d603eb930b3285
3
+ metadata.gz: 7d3ab78de8a4d9850bfa761d854aaf74cffd171460fd180fcf3ddf6e8efe8160
4
+ data.tar.gz: 6a0eef0587235ad3ba678ac9768da530c12ae92ac124c2cdbd10669cbbfa7974
5
5
  SHA512:
6
- metadata.gz: 5b95868a57546459aa12ea73df25e4963007c49eef727cfc6697c9e6d6cd0d8c15663def19a0e5ef62e6f5c8cdeef95fcd4b008cca704da528bbb10f40e58dfa
7
- data.tar.gz: 182633395847fc88e7f9375112a9ff9fe11d8e3956492a37c2f17427b168610ff20e9792ea3b6a4a1caa6b1d922907389be287e1bd9825148569e3a3ab4846ff
6
+ metadata.gz: d2a98fa9650b4d95e83d016cdaea0f7ff846c93c3893cf55501602acaf8232ac10226298da32f8fea14ad0b8bf01f147ea66093c50ab02e65893481d288fbcd0
7
+ data.tar.gz: a26ab46af82bcea4e721f04d163a333945c46c55af3ed80ea13935e79d1eb3a91cef2535a264115573b9e649a909bf1c6c5a583617c959a1f84472599c0a2f4b
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/martile.rb CHANGED
@@ -13,8 +13,11 @@ require 'mindmapdoc'
13
13
  require 'flowchartviz'
14
14
  require 'jsmenubuilder'
15
15
  require 'htmlcom'
16
+ require 'rxfhelper'
17
+ require 'mindwords'
16
18
 
17
19
 
20
+ # feature: 08-Apr-2022 A <mindwords> tag an now be embedded
18
21
  # bug fix: 01-Feb-2022 When a Martile document has nomarkdown2 tags applied,
19
22
  # they will no longer be applied from a
20
23
  # nested Martile statement
@@ -203,7 +206,9 @@ class Martile
203
206
  s255 = tabs(s253)
204
207
  puts ('s255 after tabs: ' + s255.inspect).debug if @debug
205
208
 
206
- s257 = accordion(s255)
209
+ s256 = mindwords(s255)
210
+
211
+ s257 = accordion(s256)
207
212
  puts 's257 : ' + s257.inspect if @debug
208
213
 
209
214
  toc = false if s257 =~ /class=['"]sidenav['"]>/
@@ -458,7 +463,7 @@ class Martile
458
463
  def embedtag(s)
459
464
 
460
465
  s.gsub(/\B!\(((?:https?|rse|dfs):\/\/[^\)]+)\)/) do
461
- RXFHelper.read(source=($1) ).first
466
+ RXFReader.read(source=($1) ).first
462
467
  end
463
468
 
464
469
  end
@@ -745,6 +750,35 @@ class Martile
745
750
 
746
751
  end
747
752
 
753
+
754
+ def mindwords(s1)
755
+
756
+ s = s1.clone
757
+
758
+ doc = Rexle.new("<root>#{s}</root>")
759
+ puts 'doc.root.xml: ' + doc.root.xml.inspect if @debug
760
+ a = doc.root.xpath('mindwords').map.with_index do |e, i |
761
+ puts 'e: ' + e.text.inspect if @debug
762
+ "<pre>%s</pre>" % MindWords.new(e.text).to_outline
763
+
764
+ end
765
+ puts 'mindwords a:' + a.inspect if @debug
766
+
767
+ # replaces the <mindwords> XML with HTML
768
+ a.each do |html|
769
+
770
+ istart = s =~ /^<mindwords[^>]*>/
771
+ iend = s =~ /<\/mindwords>/
772
+ puts [istart, iend].inspect if @debug
773
+ s.slice!(istart, (iend - istart) + '</mindwords>'.length + 1)
774
+ s.insert(istart, html)
775
+
776
+ end
777
+
778
+ return s
779
+
780
+ end
781
+
748
782
  def unordered_list_to_html(s)
749
783
  list_to_html s, '\*'
750
784
  end
@@ -852,7 +886,7 @@ class Martile
852
886
  target = h[:target] || 'pgview'
853
887
 
854
888
  txt = if h[:src] then
855
- RXFHelper.read(h[:src]).first.sub(/<\?links[^>]+>\n/,'')
889
+ RXFReader.read(h[:src]).first.sub(/<\?links[^>]+>\n/,'')
856
890
  else
857
891
  doc2.root.text
858
892
  end
@@ -1043,7 +1077,7 @@ class Martile
1043
1077
 
1044
1078
  svg = if source =~ /^http/ then
1045
1079
 
1046
- RXFHelper.read(source).first
1080
+ RXFReader.read(source).first
1047
1081
 
1048
1082
  else
1049
1083
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: martile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  6D95KZcJmHrfG4EGldnq07fqQvCHdxjq1Yg3FzORugyyjrO9+L73oxuf6alZi9bk
36
36
  ELVtuWI4ASfMFfqxPi48ym1T
37
37
  -----END CERTIFICATE-----
38
- date: 2022-02-01 00:00:00.000000000 Z
38
+ date: 2022-04-08 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: yatoc
@@ -61,42 +61,42 @@ dependencies:
61
61
  name: rqrcode
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: 2.1.0
67
64
  - - "~>"
68
65
  - !ruby/object:Gem::Version
69
66
  version: '2.1'
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 2.1.1
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 2.1.0
77
74
  - - "~>"
78
75
  - !ruby/object:Gem::Version
79
76
  version: '2.1'
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 2.1.1
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: mindmapdoc
82
82
  requirement: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
- version: '0.3'
86
+ version: '0.4'
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.3.7
89
+ version: 0.4.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.3'
96
+ version: '0.4'
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 0.3.7
99
+ version: 0.4.0
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: flowchartviz
102
102
  requirement: !ruby/object:Gem::Requirement
@@ -137,6 +137,26 @@ dependencies:
137
137
  - - ">="
138
138
  - !ruby/object:Gem::Version
139
139
  version: 0.2.7
140
+ - !ruby/object:Gem::Dependency
141
+ name: mindwords
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '0.8'
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: 0.8.1
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - "~>"
155
+ - !ruby/object:Gem::Version
156
+ version: '0.8'
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: 0.8.1
140
160
  description:
141
161
  email: digital.robertson@gmail.com
142
162
  executables: []
@@ -163,8 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
183
  - !ruby/object:Gem::Version
164
184
  version: '0'
165
185
  requirements: []
166
- rubyforge_project:
167
- rubygems_version: 2.7.10
186
+ rubygems_version: 3.2.22
168
187
  signing_key:
169
188
  specification_version: 4
170
189
  summary: Martile is a Markdown pre formatter which is designed to format custom Markdown
metadata.gz.sig CHANGED
Binary file