RedCloth 4.1.0 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of RedCloth might be problematic. Click here for more details.
- data/CHANGELOG +14 -0
- data/Manifest +0 -1
- data/Rakefile +10 -10
- data/RedCloth.gemspec +35 -139
- data/ext/redcloth_scan/redcloth_scan.c +7253 -7152
- data/ext/redcloth_scan/redcloth_scan.c.rl +3 -0
- data/ext/redcloth_scan/redcloth_scan.rl +3 -1
- data/lib/redcloth/formatters/html.rb +4 -0
- data/lib/redcloth/version.rb +1 -1
- data/test/basic.yml +48 -0
- data/test/html.yml +8 -2
- metadata +7 -6
@@ -37,6 +37,7 @@
|
|
37
37
|
dl_start = (dt_start mtext (LF dt_start mtext)* " "* dd_start) ;
|
38
38
|
blank_line = LF;
|
39
39
|
link_alias = ( "[" >{ ASET("type", "ignore"); } %A chars %T "]" %A uri %{ STORE_URL("href"); } ) ;
|
40
|
+
horizontal_rule = '*'{3,} | '-'{3,} | '_'{3,} ;
|
40
41
|
|
41
42
|
# image lookahead
|
42
43
|
IMG_A_LEFT = "<" %{ ASET("float", "left"); } ;
|
@@ -44,7 +45,7 @@
|
|
44
45
|
aligned_image = ( "["? "!" (IMG_A_LEFT | IMG_A_RIGHT) ) >A @{ p = reg - 1; } ;
|
45
46
|
|
46
47
|
# html blocks
|
47
|
-
BlockTagName = Name - ("pre" | "notextile" | "a" | "applet" | "basefont" | "bdo" | "br" | "font" | "iframe" | "img" | "map" | "object" | "param" | "q" | "script" | "span" | "sub" | "sup" | "abbr" | "acronym" | "cite" | "code" | "del" | "dfn" | "em" | "ins" | "kbd" | "samp" | "strong" | "var" | "b" | "big" | "i" | "s" | "small" | "strike" | "tt" | "u");
|
48
|
+
BlockTagName = Name - ("pre" | "notextile" | "a" | "applet" | "basefont" | "bdo" | "br" | "font" | "iframe" | "img" | "map" | "object" | "param" | "embed" | "q" | "script" | "span" | "sub" | "sup" | "abbr" | "acronym" | "cite" | "code" | "del" | "dfn" | "em" | "ins" | "kbd" | "samp" | "strong" | "var" | "b" | "big" | "i" | "s" | "small" | "strike" | "tt" | "u");
|
48
49
|
block_start_tag = "<" BlockTagName space+ AttrSet* (AttrEnd)? ">" | "<" BlockTagName ">";
|
49
50
|
block_empty_tag = "<" BlockTagName space+ AttrSet* (AttrEnd)? "/>" | "<" BlockTagName "/>" ;
|
50
51
|
block_end_tag = "</" BlockTagName space* ">" ;
|
@@ -303,6 +304,7 @@
|
|
303
304
|
bq_start { INLINE(html, "bq_open"); ASET("type", "p"); fgoto bq; };
|
304
305
|
block_start { fgoto block; };
|
305
306
|
footnote_start { fgoto footnote; };
|
307
|
+
horizontal_rule { INLINE(html, "hr"); };
|
306
308
|
list_start { CLEAR_LIST(); LIST_ITEM(); fgoto list; };
|
307
309
|
dl_start { p = ts; INLINE(html, "dl_open"); ASET("type", "dt"); fgoto dl; };
|
308
310
|
table { INLINE(table, "table_close"); DONE(table); fgoto block; };
|
data/lib/redcloth/version.rb
CHANGED
data/test/basic.yml
CHANGED
@@ -868,3 +868,51 @@ in: |-
|
|
868
868
|
html: |-
|
869
869
|
<p>citation [“(Berk.) Hilton”], see<br />
|
870
870
|
[Papers “blah blah.”]</p>
|
871
|
+
---
|
872
|
+
name: horizontal rule using asterisks
|
873
|
+
in: |-
|
874
|
+
Just some *** text
|
875
|
+
|
876
|
+
***
|
877
|
+
|
878
|
+
Some more text.
|
879
|
+
html: |-
|
880
|
+
<p>Just some <strong>*</strong> text</p>
|
881
|
+
<hr />
|
882
|
+
<p>Some more text.</p>
|
883
|
+
---
|
884
|
+
name: horizontal rule using more than three asterisks
|
885
|
+
in: |-
|
886
|
+
Just some **** text
|
887
|
+
|
888
|
+
****
|
889
|
+
|
890
|
+
Some more text.
|
891
|
+
html: |-
|
892
|
+
<p>Just some **** text</p>
|
893
|
+
<hr />
|
894
|
+
<p>Some more text.</p>
|
895
|
+
---
|
896
|
+
name: horizontal rule using dashes
|
897
|
+
in: |-
|
898
|
+
Just some --- text
|
899
|
+
|
900
|
+
---
|
901
|
+
|
902
|
+
Some more text.
|
903
|
+
html: |-
|
904
|
+
<p>Just some <del>-</del> text</p>
|
905
|
+
<hr />
|
906
|
+
<p>Some more text.</p>
|
907
|
+
---
|
908
|
+
name: horizontal rule using underscores
|
909
|
+
in: |-
|
910
|
+
Just some ___ text
|
911
|
+
|
912
|
+
___
|
913
|
+
|
914
|
+
Some more text.
|
915
|
+
html: |-
|
916
|
+
<p>Just some <em>_</em> text</p>
|
917
|
+
<hr />
|
918
|
+
<p>Some more text.</p>
|
data/test/html.yml
CHANGED
@@ -300,6 +300,12 @@ html: '<p><a href="http://foo.com/bar?something=1~2~3">http://foo.com/bar?someth
|
|
300
300
|
---
|
301
301
|
name: empty block
|
302
302
|
in: |-
|
303
|
-
<
|
303
|
+
<div class="test"></div>
|
304
304
|
html: |-
|
305
|
-
<
|
305
|
+
<div class="test"></div>
|
306
|
+
---
|
307
|
+
name: objects in paragraphs are not modified
|
308
|
+
in: |-
|
309
|
+
<p><object width="340" height="280"><param name="movie" value="http://www.youtube.com/v/iUbK1cBHm6E"></param><param name="wmode" value="opaque"></param><param name="allowScriptAccess" value="sameDomain"></param><embed src="http://www.youtube.com/v/iUbK1cBHm6E" type="application/x-shockwave-flash" width="340" height="280" wmode="opaque" allowScriptAccess="sameDomain"></embed></object></p>
|
310
|
+
html: |-
|
311
|
+
<p><object width="340" height="280"><param name="movie" value="http://www.youtube.com/v/iUbK1cBHm6E"></param><param name="wmode" value="opaque"></param><param name="allowScriptAccess" value="sameDomain"></param><embed src="http://www.youtube.com/v/iUbK1cBHm6E" type="application/x-shockwave-flash" width="340" height="280" wmode="opaque" allowScriptAccess="sameDomain"></embed></object></p>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RedCloth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-19 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,7 +22,7 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: "0"
|
24
24
|
version:
|
25
|
-
description: RedCloth-4.1.
|
25
|
+
description: RedCloth-4.1.1 - Textile parser for Ruby. http://redcloth.org/
|
26
26
|
email: redcloth-upwards@rubyforge.org
|
27
27
|
executables:
|
28
28
|
- redcloth
|
@@ -71,7 +71,6 @@ files:
|
|
71
71
|
- Manifest
|
72
72
|
- Rakefile
|
73
73
|
- README
|
74
|
-
- RedCloth.gemspec
|
75
74
|
- setup.rb
|
76
75
|
- test/basic.yml
|
77
76
|
- test/code.yml
|
@@ -97,6 +96,7 @@ files:
|
|
97
96
|
- test/textism.yml
|
98
97
|
- test/threshold.yml
|
99
98
|
- test/validate_fixtures.rb
|
99
|
+
- RedCloth.gemspec
|
100
100
|
- ext/redcloth_scan/redcloth_attributes.c
|
101
101
|
- ext/redcloth_scan/redcloth_inline.c
|
102
102
|
- ext/redcloth_scan/redcloth_scan.c
|
@@ -113,6 +113,7 @@ rdoc_options:
|
|
113
113
|
require_paths:
|
114
114
|
- lib
|
115
115
|
- ext
|
116
|
+
- lib/case_sensitive_require
|
116
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
117
118
|
requirements:
|
118
119
|
- - ">="
|
@@ -128,10 +129,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
129
|
requirements: []
|
129
130
|
|
130
131
|
rubyforge_project: redcloth
|
131
|
-
rubygems_version: 1.
|
132
|
+
rubygems_version: 1.3.1
|
132
133
|
signing_key:
|
133
134
|
specification_version: 2
|
134
|
-
summary: RedCloth-4.1.
|
135
|
+
summary: RedCloth-4.1.1 - Textile parser for Ruby. http://redcloth.org/
|
135
136
|
test_files:
|
136
137
|
- test/test_custom_tags.rb
|
137
138
|
- test/test_erb.rb
|