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 +4 -4
- data/lib/trac-wiki/version.rb +1 -1
- data/test/parser_test.rb +18 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e3ed3f2aa66db2cd00b4504c240b78d5478cb985246fd445ccfcd3f328697c9
|
4
|
+
data.tar.gz: 55c633635589b06b0d1a3f40ffb23f494179b52c1932bcd199f05ea51ce21bd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbb4fe3d82e1c47ecee7af3578290fd1ff97a0d8a2a0556103c345e636916e134c9cae51105982f329eb275cc773719d89f0901630a83daaa092c01b612267b2
|
7
|
+
data.tar.gz: 975d14bf33f828ff65fcee758d11fc678ce688fe2e07b4d5ca33a89949337c995fb94f0fa06bc8de00dab312a3665a14515907236c552d8bf295a05035341768
|
data/lib/trac-wiki/version.rb
CHANGED
data/test/parser_test.rb
CHANGED
@@ -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!@\#$%^&*()[]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.
|
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-
|
11
|
+
date: 2018-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bacon
|