trac-wiki 0.3.36 → 0.3.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 415e33415c8fd6778ca69642b56fb804d12a26596952cf404ca139aa1309c34f
4
- data.tar.gz: 32903689e4d5dcbc971cffaab7224e936d6c8c215d7b34e51090ba06b373a0cf
3
+ metadata.gz: 8e3ed3f2aa66db2cd00b4504c240b78d5478cb985246fd445ccfcd3f328697c9
4
+ data.tar.gz: 55c633635589b06b0d1a3f40ffb23f494179b52c1932bcd199f05ea51ce21bd9
5
5
  SHA512:
6
- metadata.gz: c2d249408785a4f16ea358d83422ec19fa278cb6924ad91eaf59c25bb13a32f3945d5e945bbb6f821c61daec18597cee57d87ba9a2c9995dc520a66f72732703
7
- data.tar.gz: 28c490f4520a64f9551800465b2ad022333c86a7064e77956c86442aeeb5cb5bf0dcd9824ea57535f5f80a2c02e8def62ca0c17ff94f04cec73a6883749cecd5
6
+ metadata.gz: fbb4fe3d82e1c47ecee7af3578290fd1ff97a0d8a2a0556103c345e636916e134c9cae51105982f329eb275cc773719d89f0901630a83daaa092c01b612267b2
7
+ data.tar.gz: 975d14bf33f828ff65fcee758d11fc678ce688fe2e07b4d5ca33a89949337c995fb94f0fa06bc8de00dab312a3665a14515907236c552d8bf295a05035341768
@@ -1,3 +1,3 @@
1
1
  module TracWiki
2
- VERSION = '0.3.36'
2
+ VERSION = '0.3.37'
3
3
  end
@@ -13,6 +13,16 @@ class Bacon::Context
13
13
  parser.at_callback = Proc.new { |k,env| k == 'MEOW' ? 'WUF' : nil }
14
14
  html.should.equal parser.to_html(wiki)
15
15
  end
16
+ def tc_mailto(html, wiki, options = {})
17
+ options[:macro_commands] = { '!print' => proc { |env| env.arg(0) + '! ' },
18
+ }
19
+ options[:allowed_schemes] = %w(http https ftp ftps mailto)
20
+ options[:template_handler] = self.method(:template_handler)
21
+
22
+ parser = TracWiki.parser(options)
23
+ parser.at_callback = Proc.new { |k,env| k == 'MEOW' ? 'WUF' : nil }
24
+ html.should.equal parser.to_html(wiki)
25
+ end
16
26
  def env(wiki, var, val,options = {})
17
27
  options[:macro_commands] = { '!print' => proc { |env| env.arg(0) + '! ' }, }
18
28
  options[:template_handler] = self.method(:template_handler)
@@ -183,7 +193,7 @@ describe 'TracWiki::Parser' do
183
193
 
184
194
  # table with div_around_table
185
195
  tc("<div class=\"table-div\"><table><tr><td>This is <em>italic</em></td>\n</tr>\n</table>\n</div>\n",
186
- "||This is ''italic''||", div_around_table: true
196
+ "||This is ''italic''||", div_around_table: true)
187
197
 
188
198
  # Links can appear inside italic text:
189
199
  tc("<p>A italic link: <em><a href=\"http://example.org/\">http://example.org/</a> nice! </em></p>\n",
@@ -1332,5 +1342,12 @@ eos
1332
1342
  tc "<p>(bhojte|ahoj=dhoj:m8afmveEhG78gsv5Pt-gJ56idfKCR10JNPr-G72Fttc=)</p>\n", "{{digesttest bhojte|ahoj=dhoj}}"
1333
1343
  tc "<p><tt>ah!@\#$%^&amp;*()[]oj</tt></p>\n", "{{!tt ah!@\#$%^&*()[]oj}}"
1334
1344
  end
1345
+ it 'should parse mailto' do
1346
+ tc_mailto "<p><a href=\"mailto:vitas@matfyz.cz\">mailto:vitas@matfyz.cz</a></p>\n", "[[mailto:vitas@matfyz.cz]]\n"
1347
+ tc_mailto "<p><a href=\"mailto:vitas@matfyz.cz\">vitas</a></p>\n", "[[mailto:vitas@matfyz.cz | vitas]]\n"
1348
+ tc_mailto "<p><a href=\"mailto:vitas@matfyz.cz?subject=napis\">vitas</a></p>\n", "[[mailto:vitas@matfyz.cz?subject=napis | vitas]]\n"
1349
+ tc_mailto "<p><a href=\"mailto:vitas@matfyz.cz?body=odpovez\">vitas</a></p>\n", "[[mailto:vitas@matfyz.cz?body=odpovez | vitas]]\n"
1350
+ tc "<p><a href=\"mailto%3Avitas%40matfyz.cz\">vitas</a></p>\n", "[[mailto:vitas@matfyz.cz | vitas]]\n"
1351
+ end
1335
1352
  end
1336
1353
  # vim: tw=0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trac-wiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.36
4
+ version: 0.3.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitas Stradal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-15 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bacon