RedCloth 4.0.4 → 4.1.0
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 +18 -5
- data/Manifest +57 -0
- data/Rakefile +138 -173
- data/RedCloth.gemspec +143 -0
- data/{extras → ext}/mingw-rbconfig.rb +0 -0
- data/ext/redcloth_scan/redcloth.h +27 -20
- data/ext/redcloth_scan/redcloth_attributes.c +41 -41
- data/ext/redcloth_scan/redcloth_attributes.c.rl +56 -0
- data/ext/redcloth_scan/redcloth_attributes.java.rl +96 -0
- data/ext/redcloth_scan/redcloth_attributes.rl +6 -51
- data/ext/redcloth_scan/redcloth_common.c.rl +18 -0
- data/ext/redcloth_scan/redcloth_common.java.rl +18 -0
- data/ext/redcloth_scan/redcloth_common.rl +17 -27
- data/ext/redcloth_scan/redcloth_inline.c +210 -211
- data/ext/redcloth_scan/redcloth_inline.c.rl +159 -0
- data/ext/redcloth_scan/redcloth_inline.java.rl +108 -0
- data/ext/redcloth_scan/redcloth_inline.rl +49 -198
- data/ext/redcloth_scan/redcloth_scan.c +6708 -6698
- data/ext/redcloth_scan/redcloth_scan.c.rl +227 -0
- data/ext/redcloth_scan/redcloth_scan.java.rl +555 -0
- data/ext/redcloth_scan/redcloth_scan.rl +66 -282
- data/lib/redcloth.rb +6 -0
- data/lib/redcloth/erb_extension.rb +27 -0
- data/lib/redcloth/version.rb +2 -2
- data/setup.rb +1585 -0
- data/test/basic.yml +3 -4
- data/test/code.yml +28 -2
- data/test/test_erb.rb +13 -0
- metadata +73 -38
- data/lib/redcloth_scan.bundle +0 -0
data/test/basic.yml
CHANGED
@@ -74,9 +74,8 @@ in: |-
|
|
74
74
|
When the elephant comes to take a p. you...
|
75
75
|
html: |-
|
76
76
|
<pre>I saw a ship. It ate my elephant.</pre>
|
77
|
-
|
78
|
-
|
79
|
-
---
|
77
|
+
<pre>When the elephant comes to take a p. you...</pre>
|
78
|
+
---
|
80
79
|
name: html tags
|
81
80
|
desc: You can certainly use HTML tags inside your Textile documents. HTML will only be escaped if it’s found in a <code>pre</code> or <code>code</code> block.
|
82
81
|
in: |-
|
@@ -868,4 +867,4 @@ in: |-
|
|
868
867
|
[Papers "blah blah."]
|
869
868
|
html: |-
|
870
869
|
<p>citation [“(Berk.) Hilton”], see<br />
|
871
|
-
[Papers “blah blah.”]</p>
|
870
|
+
[Papers “blah blah.”]</p>
|
data/test/code.yml
CHANGED
@@ -42,8 +42,7 @@ html: "<p>Math fact: 3 < 5 & 5 > 3 but £6 > $6. Oh, and 2 &d
|
|
42
42
|
latex: "Math fact: 3 \\textless{} 5 \\& 5 \\textgreater{} 3 but \\pounds{}6 \\textgreater{} \\$6. Oh, and 2 \\textdiv{} 4 is \\sfrac{1}{2}.\n\n"
|
43
43
|
---
|
44
44
|
name: escaping of existing entities in blockcode
|
45
|
-
in: "bc. Math fact: 3 < 5 & 5 > 3 but £5 > $5.
|
46
|
-
"
|
45
|
+
in: "bc. Math fact: 3 < 5 & 5 > 3 but £5 > $5."
|
47
46
|
html: "<pre><code>Math fact: 3 &lt; 5 &amp; 5 &gt; 3 but &pound;5 &#62; $5.</code></pre>"
|
48
47
|
latex: "\\begin{verbatim}\nMath fact: 3 < 5 & 5 > 3 but £5 > $5.\\end{verbatim}\n"
|
49
48
|
---
|
@@ -146,6 +145,33 @@ html: |-
|
|
146
145
|
</pre>
|
147
146
|
<p>And then go back with a normal paragraph.</p>
|
148
147
|
---
|
148
|
+
name: extended block code preserves leading whitespace after blank line
|
149
|
+
in: |-
|
150
|
+
bc.. class Foo
|
151
|
+
def bar
|
152
|
+
'bar'
|
153
|
+
end
|
154
|
+
|
155
|
+
def baz
|
156
|
+
'baz'
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
p. That's it!
|
161
|
+
html: |-
|
162
|
+
<pre><code>class Foo
|
163
|
+
def bar
|
164
|
+
'bar'
|
165
|
+
end</code>
|
166
|
+
|
167
|
+
<code> def baz
|
168
|
+
'baz'
|
169
|
+
end
|
170
|
+
end</code>
|
171
|
+
|
172
|
+
</pre>
|
173
|
+
<p>That’s it!</p>
|
174
|
+
---
|
149
175
|
name: block code containing code avoids nesting code tags
|
150
176
|
in: |-
|
151
177
|
bc. A one-liner: @ruby -ne '($h||={}).fetch($_){puts $h[$_]=$_}'@
|
data/test/test_erb.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'helper'
|
4
|
+
|
5
|
+
class TestErb < Test::Unit::TestCase
|
6
|
+
|
7
|
+
def test_redcloth_erb
|
8
|
+
template = %{<%=t "This new ERB tag makes is so _easy_ to use *RedCloth*" %>}
|
9
|
+
expected = %{<p>This new <span class="caps">ERB</span> tag makes is so <em>easy</em> to use <strong>RedCloth</strong></p>}
|
10
|
+
assert_equal expected, ERB.new(template).result
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
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.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
@@ -9,26 +9,70 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-10-
|
12
|
+
date: 2008-10-31 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: echoe
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
description: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
|
17
26
|
email: redcloth-upwards@rubyforge.org
|
18
27
|
executables:
|
19
28
|
- redcloth
|
20
29
|
extensions:
|
21
30
|
- ext/redcloth_scan/extconf.rb
|
22
31
|
extra_rdoc_files:
|
23
|
-
- README
|
24
32
|
- CHANGELOG
|
25
|
-
-
|
33
|
+
- lib/case_sensitive_require/RedCloth.rb
|
34
|
+
- lib/redcloth/erb_extension.rb
|
35
|
+
- lib/redcloth/formatters/base.rb
|
36
|
+
- lib/redcloth/formatters/html.rb
|
37
|
+
- lib/redcloth/formatters/latex.rb
|
38
|
+
- lib/redcloth/textile_doc.rb
|
39
|
+
- lib/redcloth/version.rb
|
40
|
+
- lib/redcloth.rb
|
41
|
+
- README
|
26
42
|
files:
|
43
|
+
- bin/redcloth
|
27
44
|
- CHANGELOG
|
28
45
|
- COPYING
|
29
|
-
-
|
46
|
+
- ext/mingw-rbconfig.rb
|
47
|
+
- ext/redcloth_scan/extconf.rb
|
48
|
+
- ext/redcloth_scan/redcloth.h
|
49
|
+
- ext/redcloth_scan/redcloth_attributes.c.rl
|
50
|
+
- ext/redcloth_scan/redcloth_attributes.java.rl
|
51
|
+
- ext/redcloth_scan/redcloth_attributes.rl
|
52
|
+
- ext/redcloth_scan/redcloth_common.c.rl
|
53
|
+
- ext/redcloth_scan/redcloth_common.java.rl
|
54
|
+
- ext/redcloth_scan/redcloth_common.rl
|
55
|
+
- ext/redcloth_scan/redcloth_inline.c.rl
|
56
|
+
- ext/redcloth_scan/redcloth_inline.java.rl
|
57
|
+
- ext/redcloth_scan/redcloth_inline.rl
|
58
|
+
- ext/redcloth_scan/redcloth_scan.c.rl
|
59
|
+
- ext/redcloth_scan/redcloth_scan.java.rl
|
60
|
+
- ext/redcloth_scan/redcloth_scan.rl
|
61
|
+
- extras/ragel_profiler.rb
|
62
|
+
- lib/case_sensitive_require/RedCloth.rb
|
63
|
+
- lib/redcloth/erb_extension.rb
|
64
|
+
- lib/redcloth/formatters/base.rb
|
65
|
+
- lib/redcloth/formatters/html.rb
|
66
|
+
- lib/redcloth/formatters/latex.rb
|
67
|
+
- lib/redcloth/formatters/latex_entities.yml
|
68
|
+
- lib/redcloth/textile_doc.rb
|
69
|
+
- lib/redcloth/version.rb
|
70
|
+
- lib/redcloth.rb
|
71
|
+
- Manifest
|
30
72
|
- Rakefile
|
31
|
-
-
|
73
|
+
- README
|
74
|
+
- RedCloth.gemspec
|
75
|
+
- setup.rb
|
32
76
|
- test/basic.yml
|
33
77
|
- test/code.yml
|
34
78
|
- test/definitions.yml
|
@@ -45,6 +89,7 @@ files:
|
|
45
89
|
- test/sanitize_html.yml
|
46
90
|
- test/table.yml
|
47
91
|
- test/test_custom_tags.rb
|
92
|
+
- test/test_erb.rb
|
48
93
|
- test/test_extensions.rb
|
49
94
|
- test/test_formatters.rb
|
50
95
|
- test/test_parser.rb
|
@@ -52,48 +97,33 @@ files:
|
|
52
97
|
- test/textism.yml
|
53
98
|
- test/threshold.yml
|
54
99
|
- test/validate_fixtures.rb
|
55
|
-
- lib/case_sensitive_require
|
56
|
-
- lib/case_sensitive_require/RedCloth.rb
|
57
|
-
- lib/redcloth
|
58
|
-
- lib/redcloth/formatters
|
59
|
-
- lib/redcloth/formatters/base.rb
|
60
|
-
- lib/redcloth/formatters/html.rb
|
61
|
-
- lib/redcloth/formatters/latex.rb
|
62
|
-
- lib/redcloth/formatters/latex_entities.yml
|
63
|
-
- lib/redcloth/textile_doc.rb
|
64
|
-
- lib/redcloth/version.rb
|
65
|
-
- lib/redcloth.rb
|
66
|
-
- lib/redcloth_scan.bundle
|
67
|
-
- extras/mingw-rbconfig.rb
|
68
|
-
- extras/ragel_profiler.rb
|
69
|
-
- ext/redcloth_scan/redcloth.h
|
70
100
|
- ext/redcloth_scan/redcloth_attributes.c
|
71
101
|
- ext/redcloth_scan/redcloth_inline.c
|
72
102
|
- ext/redcloth_scan/redcloth_scan.c
|
73
|
-
- ext/redcloth_scan/extconf.rb
|
74
|
-
- ext/redcloth_scan/redcloth_attributes.rl
|
75
|
-
- ext/redcloth_scan/redcloth_common.rl
|
76
|
-
- ext/redcloth_scan/redcloth_inline.rl
|
77
|
-
- ext/redcloth_scan/redcloth_scan.rl
|
78
103
|
has_rdoc: true
|
79
|
-
homepage: http://redcloth.org
|
104
|
+
homepage: http://redcloth.org
|
80
105
|
post_install_message:
|
81
|
-
rdoc_options:
|
82
|
-
|
106
|
+
rdoc_options:
|
107
|
+
- --line-numbers
|
108
|
+
- --inline-source
|
109
|
+
- --title
|
110
|
+
- RedCloth
|
111
|
+
- --main
|
112
|
+
- README
|
83
113
|
require_paths:
|
84
114
|
- lib
|
85
|
-
-
|
115
|
+
- ext
|
86
116
|
required_ruby_version: !ruby/object:Gem::Requirement
|
87
117
|
requirements:
|
88
118
|
- - ">="
|
89
119
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
120
|
+
version: 1.8.4
|
91
121
|
version:
|
92
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
123
|
requirements:
|
94
124
|
- - ">="
|
95
125
|
- !ruby/object:Gem::Version
|
96
|
-
version: "
|
126
|
+
version: "1.2"
|
97
127
|
version:
|
98
128
|
requirements: []
|
99
129
|
|
@@ -101,6 +131,11 @@ rubyforge_project: redcloth
|
|
101
131
|
rubygems_version: 1.2.0
|
102
132
|
signing_key:
|
103
133
|
specification_version: 2
|
104
|
-
summary: RedCloth-4.0
|
105
|
-
test_files:
|
106
|
-
|
134
|
+
summary: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
|
135
|
+
test_files:
|
136
|
+
- test/test_custom_tags.rb
|
137
|
+
- test/test_erb.rb
|
138
|
+
- test/test_extensions.rb
|
139
|
+
- test/test_formatters.rb
|
140
|
+
- test/test_parser.rb
|
141
|
+
- test/test_restrictions.rb
|
data/lib/redcloth_scan.bundle
DELETED
Binary file
|