trac-wiki 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -502,7 +502,7 @@ module TracWiki
502
502
  # empty line
503
503
  when /\A\s*$(\r?\n)?/
504
504
  end_paragraph
505
- when /\A([\w\s]*)::\s*/
505
+ when /\A([:\w\s]+)::(\s+|\r?\n)/
506
506
  term = $1
507
507
  start_tag('dl')
508
508
  start_tag('dt')
@@ -1,3 +1,3 @@
1
1
  module TracWiki
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -256,6 +256,23 @@ describe TracWiki::Parser do
256
256
  it 'should parse definition list' do
257
257
  # FIXME: trailing space
258
258
  tc "<dl><dt>Monty Python</dt><dd> definition</dd></dl>", "Monty Python:: \n definition\n"
259
+ tc "<dl><dt>Monty Python</dt><dd> definition</dd></dl>", "Monty Python::\ndefinition\n"
260
+ tc "<dl><dt>Monty Python</dt><dd> definition</dd></dl>", "Monty Python::\r\ndefinition\n"
261
+ tc "<dl><dt>Monty Python</dt><dd> definition</dd></dl>", "Monty Python::\r\n definition\n"
262
+ tc "<dl><dt>Monty Python</dt><dd> definition</dd></dl>", "Monty Python:: \r\n definition\n"
263
+ tc "<dl><dt>Monty Python</dt><dd> definition</dd></dl>", "Monty Python:: definition\n"
264
+ tc "<dl><dt>Monty Python</dt><dd> definition</dd></dl>", "Monty Python:: definition\n"
265
+ tc "<dl><dt>Monty::Python</dt><dd> definition</dd></dl>", "Monty::Python:: definition\n"
266
+ tc "<dl><dt>::Python</dt><dd> definition</dd></dl>", "::Python:: definition\n"
267
+ end
268
+ it 'should not parse definition list' do
269
+ # FIXME: trailing space
270
+ tc "<p>Monty::Python::definition</p>\n", "Monty::Python::definition\n"
271
+ tc "<p>bla Monty::Python bla</p>\n", "bla Monty::Python bla\n"
272
+ tc "<p>bla Monty::Python</p>\n", "bla Monty::Python\n"
273
+ tc "<p>Monty::Python bla</p>\n", "Monty::Python bla\n"
274
+ tc "<p>::Python bla</p>\n", "::Python bla\n"
275
+ tc "<p>:: Python bla</p>\n", ":: Python bla\n"
259
276
  end
260
277
  it 'should parse unordered_lists' do
261
278
  # List items begin with a * at the beginning of a line.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trac-wiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-07 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bacon