martile 0.6.33 → 0.6.34

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
  SHA1:
3
- metadata.gz: eea27e4f2401deef0ba6d81682194045c8a97970
4
- data.tar.gz: 3e164394c7bbad9fc1dbd3f1650c3002683d276c
3
+ metadata.gz: 2cd14292a169304f9c9127eee06cc5fef6329ce5
4
+ data.tar.gz: c52f7ef9270a5604744463999dcbbd473ed46be3
5
5
  SHA512:
6
- metadata.gz: c415aa63e8d2436fa6244666bb21be027a653d039e9cc512cd5773689f2faf9605d78bbc5e42abcdfa5a8c0d94d58eab69eb735c7a27c6fe70bfedfc4d917fe3
7
- data.tar.gz: 637d4fa657c91394e651b892fa98ec6d4e81769a3cbeee2825db3236f05e45c670b47e26c82a5cc6d9b1e4fe2a0ad4bd8123814cce4a857c6ae839e088650460
6
+ metadata.gz: 198d314b14d1459946640a046280f81d40c46f016051c6ef83f41bca7849f3e8e3575c81238af6d856357d1f18b5e56e919dd13ff007291c694a6dc1743a0215
7
+ data.tar.gz: 320e67aaacbba68428dfffe75741f6e55e4c672bb24477afe5a42817ce82dca9e727e8f7a7b66e7c3e2041bcb193c2784f8e8416f8be3add3c07a7994fed5048
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/martile.rb CHANGED
@@ -9,6 +9,15 @@ require 'rdiscount'
9
9
  require 'kvx'
10
10
 
11
11
 
12
+ # feature: 11-Mar-2017 A details and summary tag can now be generated from +>
13
+ # e.g.
14
+ # +>
15
+ # This a paragraph
16
+ #
17
+ # ----------------
18
+ #
19
+ # * something
20
+ # +
12
21
  # minor feature:
13
22
  # 9-Feb-2017 implemented a shorthand (^) for the mark tag
14
23
  # minor feature:
@@ -83,10 +92,11 @@ class Martile
83
92
  s17 = apply_filter(s16) {|x| mtlite_utils x }
84
93
  s18 = apply_filter(s17) {|x| hyperlinkify x }
85
94
  s19 = apply_filter(s18) {|x| highlight x }
95
+ s20 = apply_filter(s19) {|x| details x }
86
96
 
87
97
  #puts 's17 : ' + s17.inspect
88
98
 
89
- @to_s = s19
99
+ @to_s = s20
90
100
  end
91
101
 
92
102
  def to_html()
@@ -137,7 +147,27 @@ class Martile
137
147
  end.join
138
148
 
139
149
 
140
- end
150
+ end
151
+
152
+ def details(s)
153
+
154
+ s.split(/(?=\+>)/).map do |x|
155
+
156
+ if x =~ /\+>/ then
157
+
158
+ x[2..-1].sub(/(.*)[^\+]+\n\+/m) do |x2|
159
+
160
+ summary, detail = x2.split(/----+/,2)
161
+ "<details><summary>%s</summary>%s</details>" % [summary, detail.chop]
162
+
163
+ end
164
+
165
+ else
166
+ x
167
+ end
168
+ end.join
169
+
170
+ end
141
171
 
142
172
  def dynarex_to_markdown(s)
143
173
 
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: 0.6.33
4
+ version: 0.6.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -12,26 +12,26 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
14
  YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE2MDIyOTIxMjQwNloXDTE3MDIyODIxMjQwNlowSDESMBAG
15
+ 8ixkARkWAmV1MB4XDTE3MDMxMTE4NTYyMVoXDTE4MDMxMTE4NTYyMVowSDESMBAG
16
16
  A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
17
  EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBANbSoj4rFvdNUWWuKV2nb0qLTcAC0V+xHC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Ql
27
- 6WkEVIYHGER5nPC5xEMA1SqwMo//PuA91vT7vpgUXkcgrKMcb1ncaXLSSqAzY95c
28
- 8A0dLf/WcBgEcDWDFpqwsZnajcR5ViQ/Ra5QKNsSjr2xJmxO7cwhdfpFjG78dDMK
29
- TQWyjMw38DMDKV4KhW8vAPLecgEEBi5DloYDGxvf80DSkzrT2iyeIYOz4dTwJj4B
30
- oUVtmTdPivRcjY9WAuDPjaJyU9GjiOItaA5Ze45y5dwwVzU9Vpy/Rqq8gF4rIhvt
31
- fHJRwdYS8tvLYH9UFytJxDKjlovBuFUsfKP0FJlZGQGJM5JiIj5LWelTGJtJD8hI
32
- 2jPlwrOtiqZt2A==
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAaEIByGsU
27
+ w5LFZVaKXIGeimsR9HgZcW6RIqlr15ynp7+m6nhHprNKGrMveeWd/H1RbP1j9pTh
28
+ Nt7kVP3jUk8/Yh5kVGsS5J6+uvGX6UuAbuWUgo72XSwwZfOTxqrnRFhzqpuAEszy
29
+ UnzUPScQVwqo5mY9zAY2j3cBNCnGLBCK6cd9XZ7wmGTloAG1kIyW9XhKBTGaX4eY
30
+ ZCyqd2we5+XvRX025yJqzBI9B6W4P4UTZDHcSBl+62IwLkFyWBAaY1IjxzEr74Kq
31
+ ta+wi0WcePPmMfSbCGQcYixXdM6qZvflWMz0AK44eQcm6OymMXgMQG6GvHPAl6s2
32
+ ASPGReskINIIrA==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-02-09 00:00:00.000000000 Z
34
+ date: 2017-03-11 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rdiscount
metadata.gz.sig CHANGED
Binary file