rdiscount 1.2.9 → 1.2.10
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.
- data/Rakefile +2 -2
- data/ext/markdown.c +2 -2
- data/test/rdiscount_test.rb +15 -0
- metadata +4 -2
data/Rakefile
CHANGED
|
@@ -5,7 +5,7 @@ require 'rake/gempackagetask'
|
|
|
5
5
|
task :default => 'test:unit'
|
|
6
6
|
|
|
7
7
|
DLEXT = Config::CONFIG['DLEXT']
|
|
8
|
-
VERS = '1.2.
|
|
8
|
+
VERS = '1.2.10'
|
|
9
9
|
|
|
10
10
|
spec =
|
|
11
11
|
Gem::Specification.new do |s|
|
|
@@ -62,7 +62,7 @@ task :build => "lib/rdiscount.#{DLEXT}"
|
|
|
62
62
|
|
|
63
63
|
desc 'Run unit tests'
|
|
64
64
|
task 'test:unit' => [:build] do |t|
|
|
65
|
-
|
|
65
|
+
sh 'testrb test/markdown_test.rb test/rdiscount_test.rb'
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
desc 'Run conformance tests (MARKDOWN_TEST_VER=1.0)'
|
data/ext/markdown.c
CHANGED
|
@@ -615,7 +615,7 @@ listblock(Paragraph *top, int trim, MMIOT *f)
|
|
|
615
615
|
p->down = compile(p->text, 0, f);
|
|
616
616
|
p->text = label;
|
|
617
617
|
|
|
618
|
-
if ( para && (top->typ != DL) ) p->down->align = PARA;
|
|
618
|
+
if ( para && (top->typ != DL) && p->down ) p->down->align = PARA;
|
|
619
619
|
|
|
620
620
|
if ( !(q = skipempty(text)) || (islist(q,&trim) != top->typ) )
|
|
621
621
|
break;
|
|
@@ -627,7 +627,7 @@ listblock(Paragraph *top, int trim, MMIOT *f)
|
|
|
627
627
|
___mkd_freeLineRange(&anchor, q);
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
if ( para && (top->typ != DL) ) p->down->align = PARA;
|
|
630
|
+
if ( para && (top->typ != DL) && p->down ) p->down->align = PARA;
|
|
631
631
|
}
|
|
632
632
|
top->text = 0;
|
|
633
633
|
top->down = T(d);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
$: << File.join(File.dirname(__FILE__), "../lib")
|
|
2
|
+
|
|
3
|
+
require 'test/unit'
|
|
4
|
+
require 'rdiscount'
|
|
5
|
+
|
|
6
|
+
class RDiscountTest < Test::Unit::TestCase
|
|
7
|
+
def test_that_discount_does_not_blow_up_with_weird_formatting_case
|
|
8
|
+
text = (<<-TEXT).gsub(/^ {4}/, '').rstrip
|
|
9
|
+
1. some text
|
|
10
|
+
|
|
11
|
+
1.
|
|
12
|
+
TEXT
|
|
13
|
+
RDiscount.new(text).to_html
|
|
14
|
+
end
|
|
15
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rdiscount
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Tomayko
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-
|
|
12
|
+
date: 2008-09-30 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|
|
@@ -30,6 +30,7 @@ files:
|
|
|
30
30
|
- test/benchmark.rb
|
|
31
31
|
- test/benchmark.txt
|
|
32
32
|
- test/markdown_test.rb
|
|
33
|
+
- test/rdiscount_test.rb
|
|
33
34
|
- lib/markdown.rb
|
|
34
35
|
- lib/rdiscount.rb
|
|
35
36
|
- ext/extconf.rb
|
|
@@ -75,3 +76,4 @@ specification_version: 2
|
|
|
75
76
|
summary: Fast Implementation of Gruber's Markdown in C
|
|
76
77
|
test_files:
|
|
77
78
|
- test/markdown_test.rb
|
|
79
|
+
- test/rdiscount_test.rb
|