RedCloth 4.2.2 → 4.2.3
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 +11 -0
- data/README +4 -0
- data/Rakefile +14 -12
- data/RedCloth.gemspec +7 -7
- data/ext/redcloth_scan/redcloth.h +1 -1
- data/ext/redcloth_scan/redcloth_attributes.c +262 -244
- data/ext/redcloth_scan/redcloth_inline.c +5719 -3717
- data/ext/redcloth_scan/redcloth_scan.c +11922 -11570
- data/lib/redcloth/formatters/html.rb +2 -2
- data/lib/redcloth/version.rb +1 -1
- data/lib/tasks/pureruby.rake +14 -9
- data/spec/fixtures/basic.yml +15 -5
- data/spec/fixtures/threshold.yml +3 -3
- metadata +22 -8
@@ -124,14 +124,14 @@ module RedCloth::Formatters::HTML
|
|
124
124
|
|
125
125
|
def footno(opts)
|
126
126
|
opts[:id] ||= opts[:text]
|
127
|
-
%Q{<sup class="footnote"><a href=\"#fn#{opts[:id]}\">#{opts[:text]}</a></sup>}
|
127
|
+
%Q{<sup class="footnote" id=\"fnr#{opts[:id]}\"><a href=\"#fn#{opts[:id]}\">#{opts[:text]}</a></sup>}
|
128
128
|
end
|
129
129
|
|
130
130
|
def fn(opts)
|
131
131
|
no = opts[:id]
|
132
132
|
opts[:id] = "fn#{no}"
|
133
133
|
opts[:class] = ["footnote", opts[:class]].compact.join(" ")
|
134
|
-
"<p#{pba(opts)}><sup>#{no}</sup> #{opts[:text]}</p>\n"
|
134
|
+
"<p#{pba(opts)}><a href=\"#fnr#{no}\"><sup>#{no}</sup></a> #{opts[:text]}</p>\n"
|
135
135
|
end
|
136
136
|
|
137
137
|
def snip(opts)
|
data/lib/redcloth/version.rb
CHANGED
data/lib/tasks/pureruby.rake
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
-
|
1
|
+
# Apparently this file gets loaded by Rails. Only want to define the pureruby
|
2
|
+
# task in the context of RedCloth compilation (echoe loaded).
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
end
|
4
|
+
if Gem::Specification.const_defined?(:PLATFORM_CROSS_TARGETS)
|
5
|
+
Gem::Specification::PLATFORM_CROSS_TARGETS << "pureruby"
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
Gem::Specification::PLATFORM_CROSS_TARGETS.include? arg
|
7
|
+
task 'pureruby' do
|
8
|
+
reset_target 'pureruby'
|
10
9
|
end
|
11
|
-
|
12
|
-
|
10
|
+
|
11
|
+
if target = ARGV.detect do |arg|
|
12
|
+
# Hack to get the platform set before the Rakefile evaluates
|
13
|
+
Gem::Specification::PLATFORM_CROSS_TARGETS.include? arg
|
14
|
+
end
|
15
|
+
reset_target target
|
16
|
+
end
|
17
|
+
end
|
data/spec/fixtures/basic.yml
CHANGED
@@ -247,12 +247,12 @@ html: |-
|
|
247
247
|
name: footnote reference
|
248
248
|
desc: Numeric references within text to footnotes appear between square brackets.
|
249
249
|
in: This is covered elsewhere[1].
|
250
|
-
html: <p>This is covered elsewhere<sup class="footnote"><a href="#fn1">1</a></sup>.</p>
|
250
|
+
html: <p>This is covered elsewhere<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>.</p>
|
251
251
|
---
|
252
252
|
name: footnote
|
253
253
|
desc: To create the footnote that corresponds to its reference within the text, begin a new paragraph with fn and the footnote’s number, followed by a dot and a space.
|
254
254
|
in: fn1. Down here, in fact.
|
255
|
-
html: <p class="footnote" id="fn1"><sup>1</sup> Down here, in fact.</p>
|
255
|
+
html: <p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> Down here, in fact.</p>
|
256
256
|
---
|
257
257
|
name: em
|
258
258
|
desc: Emphasis to text is added by surrounding a phrase with underscores. In HTML, this often appears as <em>italics</em>.
|
@@ -367,7 +367,17 @@ name: css id
|
|
367
367
|
desc: An element ID can be given by prefixing the ID with a pound symbol and using it in place of the class.
|
368
368
|
in: p(#big-red). Red here
|
369
369
|
html: <p id="big-red">Red here</p>
|
370
|
-
---
|
370
|
+
---
|
371
|
+
name: css id with initial uppercase
|
372
|
+
desc: CSS IDs are supposed to be lowercase, but Textile understands the invalid capitalization nonetheless
|
373
|
+
in: p(#Foo). bar
|
374
|
+
html: <p id="Foo">bar</p>
|
375
|
+
---
|
376
|
+
name: css class uppercase
|
377
|
+
desc: CSS classes are supposed to be lowercase, but Textile understands the invalid capitalization nonetheless
|
378
|
+
in: p(fooBar). baz
|
379
|
+
html: <p class="fooBar">baz</p>
|
380
|
+
---
|
371
381
|
name: class and id combined
|
372
382
|
desc: Class and ID can be combined by placing the class first.
|
373
383
|
in: p(example1#big-red2). Red here
|
@@ -375,8 +385,8 @@ html: <p class="example1" id="big-red2">Red here</p>
|
|
375
385
|
---
|
376
386
|
name: css style
|
377
387
|
desc: Style settings can be provided directly by surrounding them in curly braces.
|
378
|
-
in: p{color:blue;margin:30px;font-size:120%;}. Spacey blue
|
379
|
-
html: <p style="color:blue;margin:30px;font-size:120%;">Spacey blue</p>
|
388
|
+
in: p{color:blue;margin:30px;font-size:120%;font-family:'Comic Sans'}. Spacey blue
|
389
|
+
html: <p style="color:blue;margin:30px;font-size:120%;font-family:'Comic Sans';">Spacey blue</p>
|
380
390
|
---
|
381
391
|
name: language designations
|
382
392
|
desc: Language designations can be given between angel brackets.
|
data/spec/fixtures/threshold.yml
CHANGED
@@ -252,8 +252,8 @@ in: |-
|
|
252
252
|
|
253
253
|
fn1. The footnote.
|
254
254
|
html: |-
|
255
|
-
<p>A footnote reference<sup class="footnote"><a href="#fn1">1</a></sup>.</p>
|
256
|
-
<p class="footnote" id="fn1"><sup>1</sup> The footnote.</p>
|
255
|
+
<p>A footnote reference<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>.</p>
|
256
|
+
<p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> The footnote.</p>
|
257
257
|
# html: |-
|
258
258
|
# <p>A footnote reference<sup class="footnote"><a href="#fn1216642796463b1223ae29d">1</a></sup>.</p>
|
259
259
|
# <p class="footnote" id="fn1216642796463b1223ae29d"><sup>1</sup> The footnote.</p>
|
@@ -755,7 +755,7 @@ in: |-
|
|
755
755
|
html: |-
|
756
756
|
<p>A close<img src="/img.gif" alt="" />image.<br />
|
757
757
|
A tight<a href="http://thresholdstate.com/">text</a>link.<br />
|
758
|
-
A <a href="http://thresholdstate.com/">footnoted link</a><sup class="footnote"><a href="#fn1">1</a></sup>.</p>
|
758
|
+
A <a href="http://thresholdstate.com/">footnoted link</a><sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup>.</p>
|
759
759
|
# html: |-
|
760
760
|
# <p>A close<img src="/img.gif" alt="" />image.<br />
|
761
761
|
# A tight<a href="http://thresholdstate.com/">text</a>link.<br />
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RedCloth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 4
|
7
|
+
- 2
|
8
|
+
- 3
|
9
|
+
version: 4.2.3
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Jason Garber
|
@@ -9,11 +14,13 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-03-01 00:00:00 -05:00
|
13
18
|
default_executable:
|
14
19
|
dependencies: []
|
15
20
|
|
16
|
-
description:
|
21
|
+
description: |-
|
22
|
+
RedCloth-4.2.3 - Textile parser for Ruby.
|
23
|
+
http://redcloth.org/
|
17
24
|
email: redcloth-upwards@rubyforge.org
|
18
25
|
executables:
|
19
26
|
- redcloth
|
@@ -89,6 +96,8 @@ files:
|
|
89
96
|
- ext/redcloth_scan/redcloth_scan.c
|
90
97
|
has_rdoc: true
|
91
98
|
homepage: http://redcloth.org
|
99
|
+
licenses: []
|
100
|
+
|
92
101
|
post_install_message:
|
93
102
|
rdoc_options:
|
94
103
|
- --line-numbers
|
@@ -105,20 +114,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
105
114
|
requirements:
|
106
115
|
- - ">="
|
107
116
|
- !ruby/object:Gem::Version
|
117
|
+
segments:
|
118
|
+
- 1
|
119
|
+
- 8
|
120
|
+
- 4
|
108
121
|
version: 1.8.4
|
109
|
-
version:
|
110
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
123
|
requirements:
|
112
124
|
- - ">="
|
113
125
|
- !ruby/object:Gem::Version
|
126
|
+
segments:
|
127
|
+
- 1
|
128
|
+
- 2
|
114
129
|
version: "1.2"
|
115
|
-
version:
|
116
130
|
requirements: []
|
117
131
|
|
118
132
|
rubyforge_project: redcloth
|
119
|
-
rubygems_version: 1.3.
|
133
|
+
rubygems_version: 1.3.6
|
120
134
|
signing_key:
|
121
|
-
specification_version:
|
122
|
-
summary: RedCloth-4.2.
|
135
|
+
specification_version: 3
|
136
|
+
summary: RedCloth-4.2.3 - Textile parser for Ruby. http://redcloth.org/
|
123
137
|
test_files: []
|
124
138
|
|