RedCloth 4.0.4-x86-mswin32-60 → 4.1.0-x86-mswin32-60
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 +141 -173
- data/RedCloth.gemspec +37 -0
- data/{extras → ext}/mingw-rbconfig.rb +0 -0
- data/ext/redcloth_scan/redcloth.h +27 -20
- 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.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.rl +230 -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/lib/redcloth_scan.so +0 -0
- 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 +76 -43
- data/ext/redcloth_scan/redcloth_attributes.c +0 -650
- data/ext/redcloth_scan/redcloth_inline.c +0 -10494
- data/ext/redcloth_scan/redcloth_scan.c +0 -11254
- 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: x86-mswin32-60
|
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-11-10 00:00:00 -05: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
|
-
executables:
|
19
|
-
|
27
|
+
executables:
|
28
|
+
- redcloth
|
20
29
|
extensions: []
|
21
30
|
|
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,31 @@ 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
|
-
- ext/redcloth_scan/redcloth_attributes.c
|
71
|
-
- ext/redcloth_scan/redcloth_inline.c
|
72
|
-
- 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
100
|
- lib/redcloth_scan.so
|
79
|
-
has_rdoc:
|
80
|
-
homepage: http://redcloth.org
|
101
|
+
has_rdoc: true
|
102
|
+
homepage: http://redcloth.org
|
81
103
|
post_install_message:
|
82
|
-
rdoc_options:
|
83
|
-
|
104
|
+
rdoc_options:
|
105
|
+
- --line-numbers
|
106
|
+
- --inline-source
|
107
|
+
- --title
|
108
|
+
- RedCloth
|
109
|
+
- --main
|
110
|
+
- README
|
84
111
|
require_paths:
|
85
112
|
- lib
|
113
|
+
- ext
|
86
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
87
115
|
requirements:
|
88
116
|
- - ">="
|
89
117
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
118
|
+
version: 1.8.4
|
91
119
|
version:
|
92
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - ">="
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: "
|
124
|
+
version: "1.2"
|
97
125
|
version:
|
98
126
|
requirements: []
|
99
127
|
|
@@ -101,6 +129,11 @@ rubyforge_project: redcloth
|
|
101
129
|
rubygems_version: 1.2.0
|
102
130
|
signing_key:
|
103
131
|
specification_version: 2
|
104
|
-
summary: RedCloth-4.0
|
105
|
-
test_files:
|
106
|
-
|
132
|
+
summary: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
|
133
|
+
test_files:
|
134
|
+
- test/test_custom_tags.rb
|
135
|
+
- test/test_erb.rb
|
136
|
+
- test/test_extensions.rb
|
137
|
+
- test/test_formatters.rb
|
138
|
+
- test/test_parser.rb
|
139
|
+
- test/test_restrictions.rb
|
@@ -1,650 +0,0 @@
|
|
1
|
-
#line 1 "ext/redcloth_scan/redcloth_attributes.rl"
|
2
|
-
/*
|
3
|
-
* redcloth_attributes.rl
|
4
|
-
*
|
5
|
-
* Copyright (C) 2008 Jason Garber
|
6
|
-
*/
|
7
|
-
#include <ruby.h>
|
8
|
-
#include "redcloth.h"
|
9
|
-
|
10
|
-
#line 37 "ext/redcloth_scan/redcloth_attributes.rl"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
#line 15 "ext/redcloth_scan/redcloth_attributes.c"
|
15
|
-
static const char _redcloth_attributes_actions[] = {
|
16
|
-
0, 1, 0, 1, 3, 1, 4, 1,
|
17
|
-
5, 1, 6, 1, 7, 1, 9, 1,
|
18
|
-
10, 1, 12, 1, 13, 1, 16, 1,
|
19
|
-
17, 1, 22, 1, 23, 1, 24, 2,
|
20
|
-
0, 9, 2, 2, 15, 2, 8, 20,
|
21
|
-
2, 9, 21, 2, 10, 11, 2, 13,
|
22
|
-
0, 2, 13, 1, 2, 13, 4, 2,
|
23
|
-
13, 5, 2, 13, 6, 2, 13, 7,
|
24
|
-
2, 13, 14, 2, 13, 18, 2, 13,
|
25
|
-
19, 3, 8, 9, 20, 3, 13, 0,
|
26
|
-
14, 3, 13, 0, 18, 3, 13, 0,
|
27
|
-
19, 3, 13, 1, 19, 3, 13, 4,
|
28
|
-
14, 3, 13, 4, 18, 3, 13, 4,
|
29
|
-
19
|
30
|
-
};
|
31
|
-
|
32
|
-
static const short _redcloth_attributes_key_offsets[] = {
|
33
|
-
0, 0, 6, 11, 13, 14, 15, 23,
|
34
|
-
29, 34, 38, 46, 53, 60, 66, 72,
|
35
|
-
73, 80, 86, 87, 94, 100, 108, 115,
|
36
|
-
122, 128, 134, 139, 145, 153, 160, 167,
|
37
|
-
173, 179, 186, 192, 199, 205, 212, 218,
|
38
|
-
225, 231, 233, 235, 236, 237, 244, 250,
|
39
|
-
255, 263, 270, 277, 283, 284, 291, 297,
|
40
|
-
298, 305, 311, 312, 313, 320, 326, 334,
|
41
|
-
342, 348, 356, 364, 371, 378, 388, 395,
|
42
|
-
402, 409, 416, 423, 430, 437, 447, 453,
|
43
|
-
461, 469, 476, 483, 493, 500, 507, 514,
|
44
|
-
521, 528, 535, 542, 549, 556, 559, 565,
|
45
|
-
573, 581, 588, 595, 604, 611, 618, 625
|
46
|
-
};
|
47
|
-
|
48
|
-
static const char _redcloth_attributes_trans_keys[] = {
|
49
|
-
0, 9, 10, 32, 11, 13, 0, 9,
|
50
|
-
32, 10, 13, 35, 41, 41, 41, 0,
|
51
|
-
32, 40, 46, 91, 123, 9, 13, 0,
|
52
|
-
9, 10, 32, 11, 13, 0, 9, 32,
|
53
|
-
10, 13, 0, 32, 9, 13, 0, 9,
|
54
|
-
10, 32, 35, 41, 11, 13, 0, 9,
|
55
|
-
32, 35, 41, 10, 13, 0, 9, 10,
|
56
|
-
32, 41, 11, 13, 0, 9, 32, 41,
|
57
|
-
10, 13, 0, 9, 10, 32, 11, 13,
|
58
|
-
93, 0, 9, 10, 32, 93, 11, 13,
|
59
|
-
0, 9, 32, 93, 10, 13, 125, 0,
|
60
|
-
9, 10, 32, 125, 11, 13, 0, 9,
|
61
|
-
32, 125, 10, 13, 0, 9, 10, 32,
|
62
|
-
35, 41, 11, 13, 0, 9, 32, 35,
|
63
|
-
41, 10, 13, 0, 9, 10, 32, 41,
|
64
|
-
11, 13, 0, 9, 32, 41, 10, 13,
|
65
|
-
0, 9, 10, 32, 11, 13, 0, 9,
|
66
|
-
32, 10, 13, 0, 9, 10, 32, 11,
|
67
|
-
13, 0, 9, 10, 32, 35, 41, 11,
|
68
|
-
13, 0, 9, 32, 35, 41, 10, 13,
|
69
|
-
0, 9, 10, 32, 41, 11, 13, 0,
|
70
|
-
9, 32, 41, 10, 13, 0, 9, 10,
|
71
|
-
32, 11, 13, 0, 9, 10, 32, 93,
|
72
|
-
11, 13, 0, 9, 32, 93, 10, 13,
|
73
|
-
0, 9, 10, 32, 125, 11, 13, 0,
|
74
|
-
9, 32, 125, 10, 13, 0, 9, 10,
|
75
|
-
32, 93, 11, 13, 0, 9, 32, 93,
|
76
|
-
10, 13, 0, 9, 10, 32, 125, 11,
|
77
|
-
13, 0, 9, 32, 125, 10, 13, 35,
|
78
|
-
41, 35, 41, 41, 41, 0, 32, 40,
|
79
|
-
91, 123, 9, 13, 0, 9, 10, 32,
|
80
|
-
11, 13, 0, 9, 32, 10, 13, 0,
|
81
|
-
9, 10, 32, 35, 41, 11, 13, 0,
|
82
|
-
9, 32, 35, 41, 10, 13, 0, 9,
|
83
|
-
10, 32, 41, 11, 13, 0, 9, 32,
|
84
|
-
41, 10, 13, 93, 0, 9, 10, 32,
|
85
|
-
93, 11, 13, 0, 9, 32, 93, 10,
|
86
|
-
13, 125, 0, 9, 10, 32, 125, 11,
|
87
|
-
13, 0, 9, 32, 125, 10, 13, 93,
|
88
|
-
125, 0, 32, 40, 91, 123, 9, 13,
|
89
|
-
0, 9, 10, 32, 11, 13, 0, 9,
|
90
|
-
10, 32, 35, 41, 11, 13, 0, 9,
|
91
|
-
10, 32, 35, 41, 11, 13, 0, 9,
|
92
|
-
10, 32, 11, 13, 0, 9, 10, 32,
|
93
|
-
35, 41, 11, 13, 0, 9, 10, 32,
|
94
|
-
35, 41, 11, 13, 0, 9, 10, 32,
|
95
|
-
41, 11, 13, 0, 9, 10, 32, 41,
|
96
|
-
11, 13, 0, 9, 10, 32, 40, 46,
|
97
|
-
91, 123, 11, 13, 0, 9, 10, 32,
|
98
|
-
46, 11, 13, 0, 9, 10, 32, 93,
|
99
|
-
11, 13, 0, 9, 10, 32, 93, 11,
|
100
|
-
13, 0, 9, 10, 32, 125, 11, 13,
|
101
|
-
0, 9, 10, 32, 125, 11, 13, 0,
|
102
|
-
9, 10, 32, 41, 11, 13, 0, 9,
|
103
|
-
10, 32, 41, 11, 13, 0, 9, 10,
|
104
|
-
32, 40, 46, 91, 123, 11, 13, 0,
|
105
|
-
9, 10, 32, 11, 13, 0, 9, 10,
|
106
|
-
32, 35, 41, 11, 13, 0, 9, 10,
|
107
|
-
32, 35, 41, 11, 13, 0, 9, 10,
|
108
|
-
32, 41, 11, 13, 0, 9, 10, 32,
|
109
|
-
41, 11, 13, 0, 9, 10, 32, 40,
|
110
|
-
46, 91, 123, 11, 13, 0, 9, 10,
|
111
|
-
32, 46, 11, 13, 0, 9, 10, 32,
|
112
|
-
93, 11, 13, 0, 9, 10, 32, 93,
|
113
|
-
11, 13, 0, 9, 10, 32, 125, 11,
|
114
|
-
13, 0, 9, 10, 32, 125, 11, 13,
|
115
|
-
0, 9, 10, 32, 93, 11, 13, 0,
|
116
|
-
9, 10, 32, 93, 11, 13, 0, 9,
|
117
|
-
10, 32, 125, 11, 13, 0, 9, 10,
|
118
|
-
32, 125, 11, 13, 40, 91, 123, 0,
|
119
|
-
9, 10, 32, 11, 13, 0, 9, 10,
|
120
|
-
32, 35, 41, 11, 13, 0, 9, 10,
|
121
|
-
32, 35, 41, 11, 13, 0, 9, 10,
|
122
|
-
32, 41, 11, 13, 0, 9, 10, 32,
|
123
|
-
41, 11, 13, 0, 9, 10, 32, 40,
|
124
|
-
91, 123, 11, 13, 0, 9, 10, 32,
|
125
|
-
93, 11, 13, 0, 9, 10, 32, 93,
|
126
|
-
11, 13, 0, 9, 10, 32, 125, 11,
|
127
|
-
13, 0, 9, 10, 32, 125, 11, 13,
|
128
|
-
0
|
129
|
-
};
|
130
|
-
|
131
|
-
static const char _redcloth_attributes_single_lengths[] = {
|
132
|
-
0, 4, 3, 2, 1, 1, 6, 4,
|
133
|
-
3, 2, 6, 5, 5, 4, 4, 1,
|
134
|
-
5, 4, 1, 5, 4, 6, 5, 5,
|
135
|
-
4, 4, 3, 4, 6, 5, 5, 4,
|
136
|
-
4, 5, 4, 5, 4, 5, 4, 5,
|
137
|
-
4, 2, 2, 1, 1, 5, 4, 3,
|
138
|
-
6, 5, 5, 4, 1, 5, 4, 1,
|
139
|
-
5, 4, 1, 1, 5, 4, 6, 6,
|
140
|
-
4, 6, 6, 5, 5, 8, 5, 5,
|
141
|
-
5, 5, 5, 5, 5, 8, 4, 6,
|
142
|
-
6, 5, 5, 8, 5, 5, 5, 5,
|
143
|
-
5, 5, 5, 5, 5, 3, 4, 6,
|
144
|
-
6, 5, 5, 7, 5, 5, 5, 5
|
145
|
-
};
|
146
|
-
|
147
|
-
static const char _redcloth_attributes_range_lengths[] = {
|
148
|
-
0, 1, 1, 0, 0, 0, 1, 1,
|
149
|
-
1, 1, 1, 1, 1, 1, 1, 0,
|
150
|
-
1, 1, 0, 1, 1, 1, 1, 1,
|
151
|
-
1, 1, 1, 1, 1, 1, 1, 1,
|
152
|
-
1, 1, 1, 1, 1, 1, 1, 1,
|
153
|
-
1, 0, 0, 0, 0, 1, 1, 1,
|
154
|
-
1, 1, 1, 1, 0, 1, 1, 0,
|
155
|
-
1, 1, 0, 0, 1, 1, 1, 1,
|
156
|
-
1, 1, 1, 1, 1, 1, 1, 1,
|
157
|
-
1, 1, 1, 1, 1, 1, 1, 1,
|
158
|
-
1, 1, 1, 1, 1, 1, 1, 1,
|
159
|
-
1, 1, 1, 1, 1, 0, 1, 1,
|
160
|
-
1, 1, 1, 1, 1, 1, 1, 1
|
161
|
-
};
|
162
|
-
|
163
|
-
static const short _redcloth_attributes_index_offsets[] = {
|
164
|
-
0, 0, 6, 11, 14, 16, 18, 26,
|
165
|
-
32, 37, 41, 49, 56, 63, 69, 75,
|
166
|
-
77, 84, 90, 92, 99, 105, 113, 120,
|
167
|
-
127, 133, 139, 144, 150, 158, 165, 172,
|
168
|
-
178, 184, 191, 197, 204, 210, 217, 223,
|
169
|
-
230, 236, 239, 242, 244, 246, 253, 259,
|
170
|
-
264, 272, 279, 286, 292, 294, 301, 307,
|
171
|
-
309, 316, 322, 324, 326, 333, 339, 347,
|
172
|
-
355, 361, 369, 377, 384, 391, 401, 408,
|
173
|
-
415, 422, 429, 436, 443, 450, 460, 466,
|
174
|
-
474, 482, 489, 496, 506, 513, 520, 527,
|
175
|
-
534, 541, 548, 555, 562, 569, 573, 579,
|
176
|
-
587, 595, 602, 609, 618, 625, 632, 639
|
177
|
-
};
|
178
|
-
|
179
|
-
static const unsigned char _redcloth_attributes_indicies[] = {
|
180
|
-
0, 2, 3, 2, 0, 1, 0, 2,
|
181
|
-
2, 0, 1, 6, 7, 5, 4, 8,
|
182
|
-
10, 9, 4, 12, 13, 14, 15, 16,
|
183
|
-
4, 11, 17, 19, 20, 19, 17, 18,
|
184
|
-
17, 19, 19, 17, 18, 4, 12, 4,
|
185
|
-
11, 5, 22, 23, 22, 24, 25, 5,
|
186
|
-
21, 5, 22, 22, 24, 25, 5, 21,
|
187
|
-
9, 27, 28, 27, 29, 9, 26, 9,
|
188
|
-
27, 27, 29, 9, 26, 17, 19, 20,
|
189
|
-
30, 17, 11, 32, 31, 31, 34, 35,
|
190
|
-
34, 36, 31, 33, 31, 34, 34, 36,
|
191
|
-
31, 33, 38, 37, 37, 40, 41, 40,
|
192
|
-
42, 37, 39, 37, 40, 40, 42, 37,
|
193
|
-
39, 5, 44, 45, 44, 46, 47, 5,
|
194
|
-
43, 5, 44, 44, 46, 47, 5, 43,
|
195
|
-
9, 49, 50, 49, 51, 9, 48, 9,
|
196
|
-
49, 49, 51, 9, 48, 17, 53, 54,
|
197
|
-
53, 17, 52, 17, 53, 53, 17, 52,
|
198
|
-
0, 2, 3, 56, 0, 55, 5, 58,
|
199
|
-
59, 58, 60, 61, 5, 57, 5, 58,
|
200
|
-
58, 60, 61, 5, 57, 9, 63, 64,
|
201
|
-
63, 65, 9, 62, 9, 63, 63, 65,
|
202
|
-
9, 62, 17, 53, 54, 66, 17, 55,
|
203
|
-
31, 68, 69, 68, 70, 31, 67, 31,
|
204
|
-
68, 68, 70, 31, 67, 37, 72, 73,
|
205
|
-
72, 74, 37, 71, 37, 72, 72, 74,
|
206
|
-
37, 71, 31, 76, 77, 76, 78, 31,
|
207
|
-
75, 31, 76, 76, 78, 31, 75, 37,
|
208
|
-
80, 81, 80, 82, 37, 79, 37, 80,
|
209
|
-
80, 82, 37, 79, 84, 85, 83, 88,
|
210
|
-
89, 87, 86, 90, 92, 91, 86, 86,
|
211
|
-
94, 95, 96, 86, 93, 97, 99, 100,
|
212
|
-
99, 97, 98, 97, 99, 99, 97, 98,
|
213
|
-
87, 102, 103, 102, 104, 105, 87, 101,
|
214
|
-
87, 102, 102, 104, 105, 87, 101, 91,
|
215
|
-
107, 108, 107, 109, 91, 106, 91, 107,
|
216
|
-
107, 109, 91, 106, 111, 110, 110, 113,
|
217
|
-
114, 113, 115, 110, 112, 110, 113, 113,
|
218
|
-
115, 110, 112, 117, 116, 116, 119, 120,
|
219
|
-
119, 121, 116, 118, 116, 119, 119, 121,
|
220
|
-
116, 118, 123, 122, 123, 124, 123, 123,
|
221
|
-
126, 127, 128, 123, 125, 129, 2, 3,
|
222
|
-
2, 129, 1, 131, 132, 133, 132, 134,
|
223
|
-
135, 131, 130, 136, 44, 45, 44, 46,
|
224
|
-
47, 136, 43, 137, 19, 20, 19, 137,
|
225
|
-
18, 139, 140, 141, 140, 142, 143, 139,
|
226
|
-
138, 5, 22, 23, 22, 24, 25, 5,
|
227
|
-
21, 8, 145, 146, 145, 18, 8, 144,
|
228
|
-
9, 27, 28, 27, 29, 9, 26, 137,
|
229
|
-
19, 20, 30, 13, 14, 15, 16, 137,
|
230
|
-
11, 137, 19, 20, 30, 14, 137, 11,
|
231
|
-
148, 149, 150, 149, 18, 148, 147, 31,
|
232
|
-
34, 35, 34, 36, 31, 33, 152, 153,
|
233
|
-
154, 153, 18, 152, 151, 37, 40, 41,
|
234
|
-
40, 42, 37, 39, 156, 157, 158, 157,
|
235
|
-
1, 156, 155, 159, 49, 50, 49, 51,
|
236
|
-
159, 48, 129, 2, 3, 56, 160, 161,
|
237
|
-
162, 163, 129, 55, 164, 53, 54, 53,
|
238
|
-
164, 52, 131, 166, 167, 166, 168, 169,
|
239
|
-
131, 165, 136, 58, 59, 58, 60, 61,
|
240
|
-
136, 57, 156, 171, 172, 171, 52, 156,
|
241
|
-
170, 159, 63, 64, 63, 65, 159, 62,
|
242
|
-
164, 53, 54, 66, 160, 161, 162, 163,
|
243
|
-
164, 55, 164, 53, 54, 66, 161, 164,
|
244
|
-
55, 174, 175, 176, 175, 52, 174, 173,
|
245
|
-
177, 68, 69, 68, 70, 177, 67, 179,
|
246
|
-
180, 181, 180, 52, 179, 178, 182, 72,
|
247
|
-
73, 72, 74, 182, 71, 174, 184, 185,
|
248
|
-
184, 1, 174, 183, 177, 76, 77, 76,
|
249
|
-
78, 177, 75, 179, 187, 188, 187, 1,
|
250
|
-
179, 186, 182, 80, 81, 80, 82, 182,
|
251
|
-
79, 189, 190, 191, 123, 192, 99, 100,
|
252
|
-
99, 192, 98, 83, 194, 195, 194, 196,
|
253
|
-
197, 83, 193, 87, 102, 103, 102, 104,
|
254
|
-
105, 87, 101, 90, 199, 200, 199, 98,
|
255
|
-
90, 198, 91, 107, 108, 107, 109, 91,
|
256
|
-
106, 192, 99, 100, 99, 94, 95, 96,
|
257
|
-
192, 93, 122, 202, 203, 202, 98, 122,
|
258
|
-
201, 110, 113, 114, 113, 115, 110, 112,
|
259
|
-
124, 205, 206, 205, 98, 124, 204, 116,
|
260
|
-
119, 120, 119, 121, 116, 118, 0
|
261
|
-
};
|
262
|
-
|
263
|
-
static const char _redcloth_attributes_trans_targs[] = {
|
264
|
-
60, 61, 1, 2, 60, 3, 4, 6,
|
265
|
-
5, 5, 6, 64, 9, 65, 70, 71,
|
266
|
-
73, 60, 64, 7, 8, 66, 10, 11,
|
267
|
-
67, 69, 68, 12, 13, 69, 14, 15,
|
268
|
-
6, 72, 16, 17, 69, 18, 6, 74,
|
269
|
-
19, 20, 69, 63, 21, 22, 75, 77,
|
270
|
-
76, 23, 24, 77, 78, 25, 26, 78,
|
271
|
-
27, 80, 28, 29, 81, 83, 82, 30,
|
272
|
-
31, 83, 32, 86, 33, 34, 83, 88,
|
273
|
-
35, 36, 83, 90, 37, 38, 77, 92,
|
274
|
-
39, 40, 77, 42, 43, 45, 93, 42,
|
275
|
-
43, 45, 44, 44, 45, 94, 95, 100,
|
276
|
-
102, 93, 94, 46, 47, 96, 48, 49,
|
277
|
-
97, 99, 98, 50, 51, 99, 52, 45,
|
278
|
-
101, 53, 54, 99, 55, 45, 103, 56,
|
279
|
-
57, 99, 52, 0, 55, 61, 62, 89,
|
280
|
-
91, 60, 63, 3, 21, 22, 75, 77,
|
281
|
-
3, 60, 66, 3, 10, 11, 67, 69,
|
282
|
-
68, 12, 13, 72, 15, 16, 17, 74,
|
283
|
-
18, 19, 20, 76, 5, 23, 24, 5,
|
284
|
-
79, 84, 85, 87, 60, 80, 28, 29,
|
285
|
-
81, 83, 82, 30, 31, 86, 15, 33,
|
286
|
-
34, 15, 88, 18, 35, 36, 18, 90,
|
287
|
-
37, 38, 92, 39, 40, 41, 58, 59,
|
288
|
-
93, 96, 48, 49, 97, 99, 98, 50,
|
289
|
-
51, 101, 53, 54, 103, 56, 57
|
290
|
-
};
|
291
|
-
|
292
|
-
static const char _redcloth_attributes_trans_actions[] = {
|
293
|
-
27, 19, 0, 0, 29, 0, 5, 5,
|
294
|
-
1, 0, 7, 46, 0, 81, 46, 81,
|
295
|
-
81, 25, 19, 0, 0, 67, 0, 0,
|
296
|
-
97, 52, 67, 0, 0, 55, 0, 0,
|
297
|
-
9, 67, 0, 0, 58, 0, 11, 67,
|
298
|
-
0, 0, 61, 70, 0, 0, 101, 52,
|
299
|
-
70, 0, 0, 55, 19, 0, 0, 46,
|
300
|
-
0, 67, 0, 0, 97, 52, 67, 0,
|
301
|
-
0, 55, 0, 67, 0, 0, 58, 67,
|
302
|
-
0, 0, 61, 70, 0, 0, 58, 70,
|
303
|
-
0, 0, 61, 1, 0, 0, 23, 0,
|
304
|
-
5, 5, 1, 0, 7, 46, 77, 77,
|
305
|
-
77, 21, 19, 0, 0, 64, 0, 0,
|
306
|
-
93, 52, 64, 0, 0, 55, 0, 9,
|
307
|
-
64, 0, 0, 58, 0, 11, 64, 0,
|
308
|
-
0, 61, 1, 0, 1, 49, 89, 89,
|
309
|
-
89, 40, 85, 31, 1, 1, 70, 19,
|
310
|
-
13, 37, 81, 1, 1, 1, 67, 19,
|
311
|
-
81, 1, 1, 81, 1, 1, 1, 81,
|
312
|
-
1, 1, 1, 85, 31, 1, 1, 13,
|
313
|
-
81, 46, 81, 81, 73, 81, 1, 1,
|
314
|
-
67, 19, 81, 1, 1, 81, 31, 1,
|
315
|
-
1, 13, 81, 31, 1, 1, 13, 85,
|
316
|
-
1, 1, 85, 1, 1, 3, 3, 3,
|
317
|
-
34, 77, 1, 1, 64, 19, 77, 1,
|
318
|
-
1, 77, 1, 1, 77, 1, 1
|
319
|
-
};
|
320
|
-
|
321
|
-
static const char _redcloth_attributes_to_state_actions[] = {
|
322
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
323
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
324
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
325
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
326
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
327
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
328
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
329
|
-
0, 0, 0, 0, 15, 0, 0, 0,
|
330
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
331
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
332
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
333
|
-
0, 0, 0, 0, 0, 43, 0, 0,
|
334
|
-
0, 0, 0, 0, 0, 0, 0, 0
|
335
|
-
};
|
336
|
-
|
337
|
-
static const char _redcloth_attributes_from_state_actions[] = {
|
338
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
339
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
340
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
341
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
342
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
343
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
344
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
345
|
-
0, 0, 0, 0, 17, 0, 0, 0,
|
346
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
347
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
348
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
349
|
-
0, 0, 0, 0, 0, 17, 0, 0,
|
350
|
-
0, 0, 0, 0, 0, 0, 0, 0
|
351
|
-
};
|
352
|
-
|
353
|
-
static const short _redcloth_attributes_eof_trans[] = {
|
354
|
-
0, 1, 1, 5, 5, 5, 5, 18,
|
355
|
-
18, 5, 18, 18, 18, 18, 18, 5,
|
356
|
-
18, 18, 5, 18, 18, 1, 1, 1,
|
357
|
-
1, 18, 18, 1, 18, 18, 18, 18,
|
358
|
-
18, 18, 18, 18, 18, 1, 1, 1,
|
359
|
-
1, 0, 87, 87, 87, 87, 98, 98,
|
360
|
-
98, 98, 98, 98, 87, 98, 98, 87,
|
361
|
-
98, 98, 0, 0, 0, 130, 130, 130,
|
362
|
-
138, 138, 138, 138, 138, 138, 138, 138,
|
363
|
-
138, 138, 138, 130, 130, 130, 165, 165,
|
364
|
-
165, 165, 165, 165, 165, 165, 165, 165,
|
365
|
-
165, 130, 130, 130, 130, 0, 193, 193,
|
366
|
-
193, 193, 193, 193, 193, 193, 193, 193
|
367
|
-
};
|
368
|
-
|
369
|
-
static const int redcloth_attributes_start = 60;
|
370
|
-
static const int redcloth_attributes_error = 0;
|
371
|
-
|
372
|
-
static const int redcloth_attributes_en_inline = 93;
|
373
|
-
static const int redcloth_attributes_en_link_says = 60;
|
374
|
-
|
375
|
-
#line 40 "ext/redcloth_scan/redcloth_attributes.rl"
|
376
|
-
|
377
|
-
|
378
|
-
VALUE
|
379
|
-
redcloth_attribute_parser(machine, self, p, pe)
|
380
|
-
int machine;
|
381
|
-
VALUE self;
|
382
|
-
char *p, *pe;
|
383
|
-
{
|
384
|
-
int cs, act;
|
385
|
-
char *ts, *te, *reg, *bck, *eof;
|
386
|
-
VALUE regs = rb_hash_new();
|
387
|
-
VALUE buf = Qnil;
|
388
|
-
|
389
|
-
|
390
|
-
#line 391 "ext/redcloth_scan/redcloth_attributes.c"
|
391
|
-
{
|
392
|
-
cs = redcloth_attributes_start;
|
393
|
-
ts = 0;
|
394
|
-
te = 0;
|
395
|
-
act = 0;
|
396
|
-
}
|
397
|
-
#line 54 "ext/redcloth_scan/redcloth_attributes.rl"
|
398
|
-
|
399
|
-
cs = machine;
|
400
|
-
|
401
|
-
|
402
|
-
#line 403 "ext/redcloth_scan/redcloth_attributes.c"
|
403
|
-
{
|
404
|
-
int _klen;
|
405
|
-
unsigned int _trans;
|
406
|
-
const char *_acts;
|
407
|
-
unsigned int _nacts;
|
408
|
-
const char *_keys;
|
409
|
-
|
410
|
-
if ( p == pe )
|
411
|
-
goto _test_eof;
|
412
|
-
if ( cs == 0 )
|
413
|
-
goto _out;
|
414
|
-
_resume:
|
415
|
-
_acts = _redcloth_attributes_actions + _redcloth_attributes_from_state_actions[cs];
|
416
|
-
_nacts = (unsigned int) *_acts++;
|
417
|
-
while ( _nacts-- > 0 ) {
|
418
|
-
switch ( *_acts++ ) {
|
419
|
-
case 12:
|
420
|
-
#line 1 "ext/redcloth_scan/redcloth_attributes.rl"
|
421
|
-
{ts = p;}
|
422
|
-
break;
|
423
|
-
#line 424 "ext/redcloth_scan/redcloth_attributes.c"
|
424
|
-
}
|
425
|
-
}
|
426
|
-
|
427
|
-
_keys = _redcloth_attributes_trans_keys + _redcloth_attributes_key_offsets[cs];
|
428
|
-
_trans = _redcloth_attributes_index_offsets[cs];
|
429
|
-
|
430
|
-
_klen = _redcloth_attributes_single_lengths[cs];
|
431
|
-
if ( _klen > 0 ) {
|
432
|
-
const char *_lower = _keys;
|
433
|
-
const char *_mid;
|
434
|
-
const char *_upper = _keys + _klen - 1;
|
435
|
-
while (1) {
|
436
|
-
if ( _upper < _lower )
|
437
|
-
break;
|
438
|
-
|
439
|
-
_mid = _lower + ((_upper-_lower) >> 1);
|
440
|
-
if ( (*p) < *_mid )
|
441
|
-
_upper = _mid - 1;
|
442
|
-
else if ( (*p) > *_mid )
|
443
|
-
_lower = _mid + 1;
|
444
|
-
else {
|
445
|
-
_trans += (_mid - _keys);
|
446
|
-
goto _match;
|
447
|
-
}
|
448
|
-
}
|
449
|
-
_keys += _klen;
|
450
|
-
_trans += _klen;
|
451
|
-
}
|
452
|
-
|
453
|
-
_klen = _redcloth_attributes_range_lengths[cs];
|
454
|
-
if ( _klen > 0 ) {
|
455
|
-
const char *_lower = _keys;
|
456
|
-
const char *_mid;
|
457
|
-
const char *_upper = _keys + (_klen<<1) - 2;
|
458
|
-
while (1) {
|
459
|
-
if ( _upper < _lower )
|
460
|
-
break;
|
461
|
-
|
462
|
-
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
463
|
-
if ( (*p) < _mid[0] )
|
464
|
-
_upper = _mid - 2;
|
465
|
-
else if ( (*p) > _mid[1] )
|
466
|
-
_lower = _mid + 2;
|
467
|
-
else {
|
468
|
-
_trans += ((_mid - _keys)>>1);
|
469
|
-
goto _match;
|
470
|
-
}
|
471
|
-
}
|
472
|
-
_trans += _klen;
|
473
|
-
}
|
474
|
-
|
475
|
-
_match:
|
476
|
-
_trans = _redcloth_attributes_indicies[_trans];
|
477
|
-
_eof_trans:
|
478
|
-
cs = _redcloth_attributes_trans_targs[_trans];
|
479
|
-
|
480
|
-
if ( _redcloth_attributes_trans_actions[_trans] == 0 )
|
481
|
-
goto _again;
|
482
|
-
|
483
|
-
_acts = _redcloth_attributes_actions + _redcloth_attributes_trans_actions[_trans];
|
484
|
-
_nacts = (unsigned int) *_acts++;
|
485
|
-
while ( _nacts-- > 0 )
|
486
|
-
{
|
487
|
-
switch ( *_acts++ )
|
488
|
-
{
|
489
|
-
case 0:
|
490
|
-
#line 5 "ext/redcloth_scan/redcloth_attributes.rl"
|
491
|
-
{ reg = p; }
|
492
|
-
break;
|
493
|
-
case 1:
|
494
|
-
#line 6 "ext/redcloth_scan/redcloth_attributes.rl"
|
495
|
-
{ bck = p; }
|
496
|
-
break;
|
497
|
-
case 2:
|
498
|
-
#line 7 "ext/redcloth_scan/redcloth_attributes.rl"
|
499
|
-
{ STORE(text); }
|
500
|
-
break;
|
501
|
-
case 3:
|
502
|
-
#line 8 "ext/redcloth_scan/redcloth_attributes.rl"
|
503
|
-
{ CLEAR_REGS(); reg = NULL; }
|
504
|
-
break;
|
505
|
-
case 4:
|
506
|
-
#line 14 "ext/redcloth_scan/redcloth_attributes.rl"
|
507
|
-
{ STORE(class_buf) }
|
508
|
-
break;
|
509
|
-
case 5:
|
510
|
-
#line 14 "ext/redcloth_scan/redcloth_attributes.rl"
|
511
|
-
{STORE(id_buf)}
|
512
|
-
break;
|
513
|
-
case 6:
|
514
|
-
#line 15 "ext/redcloth_scan/redcloth_attributes.rl"
|
515
|
-
{ STORE(lang_buf) }
|
516
|
-
break;
|
517
|
-
case 7:
|
518
|
-
#line 16 "ext/redcloth_scan/redcloth_attributes.rl"
|
519
|
-
{ STORE(style_buf) }
|
520
|
-
break;
|
521
|
-
case 8:
|
522
|
-
#line 27 "ext/redcloth_scan/redcloth_attributes.rl"
|
523
|
-
{ STORE(name) }
|
524
|
-
break;
|
525
|
-
case 9:
|
526
|
-
#line 28 "ext/redcloth_scan/redcloth_attributes.rl"
|
527
|
-
{ STORE_B(name_without_attributes) }
|
528
|
-
break;
|
529
|
-
case 13:
|
530
|
-
#line 1 "ext/redcloth_scan/redcloth_attributes.rl"
|
531
|
-
{te = p+1;}
|
532
|
-
break;
|
533
|
-
case 14:
|
534
|
-
#line 23 "ext/redcloth_scan/redcloth_attributes.rl"
|
535
|
-
{act = 1;}
|
536
|
-
break;
|
537
|
-
case 15:
|
538
|
-
#line 23 "ext/redcloth_scan/redcloth_attributes.rl"
|
539
|
-
{te = p;p--;{ SET_ATTRIBUTES(); }}
|
540
|
-
break;
|
541
|
-
case 16:
|
542
|
-
#line 23 "ext/redcloth_scan/redcloth_attributes.rl"
|
543
|
-
{{p = ((te))-1;}{ SET_ATTRIBUTES(); }}
|
544
|
-
break;
|
545
|
-
case 17:
|
546
|
-
#line 1 "ext/redcloth_scan/redcloth_attributes.rl"
|
547
|
-
{ switch( act ) {
|
548
|
-
case 0:
|
549
|
-
{{cs = 0; goto _again;}}
|
550
|
-
break;
|
551
|
-
case 1:
|
552
|
-
{{p = ((te))-1;} SET_ATTRIBUTES(); }
|
553
|
-
break;
|
554
|
-
}
|
555
|
-
}
|
556
|
-
break;
|
557
|
-
case 18:
|
558
|
-
#line 32 "ext/redcloth_scan/redcloth_attributes.rl"
|
559
|
-
{act = 2;}
|
560
|
-
break;
|
561
|
-
case 19:
|
562
|
-
#line 33 "ext/redcloth_scan/redcloth_attributes.rl"
|
563
|
-
{act = 3;}
|
564
|
-
break;
|
565
|
-
case 20:
|
566
|
-
#line 32 "ext/redcloth_scan/redcloth_attributes.rl"
|
567
|
-
{te = p;p--;{ SET_ATTRIBUTES(); }}
|
568
|
-
break;
|
569
|
-
case 21:
|
570
|
-
#line 33 "ext/redcloth_scan/redcloth_attributes.rl"
|
571
|
-
{te = p;p--;{ SET_ATTRIBUTE("name_without_attributes", "name"); }}
|
572
|
-
break;
|
573
|
-
case 22:
|
574
|
-
#line 32 "ext/redcloth_scan/redcloth_attributes.rl"
|
575
|
-
{{p = ((te))-1;}{ SET_ATTRIBUTES(); }}
|
576
|
-
break;
|
577
|
-
case 23:
|
578
|
-
#line 33 "ext/redcloth_scan/redcloth_attributes.rl"
|
579
|
-
{{p = ((te))-1;}{ SET_ATTRIBUTE("name_without_attributes", "name"); }}
|
580
|
-
break;
|
581
|
-
case 24:
|
582
|
-
#line 1 "ext/redcloth_scan/redcloth_attributes.rl"
|
583
|
-
{ switch( act ) {
|
584
|
-
case 2:
|
585
|
-
{{p = ((te))-1;} SET_ATTRIBUTES(); }
|
586
|
-
break;
|
587
|
-
case 3:
|
588
|
-
{{p = ((te))-1;} SET_ATTRIBUTE("name_without_attributes", "name"); }
|
589
|
-
break;
|
590
|
-
}
|
591
|
-
}
|
592
|
-
break;
|
593
|
-
#line 594 "ext/redcloth_scan/redcloth_attributes.c"
|
594
|
-
}
|
595
|
-
}
|
596
|
-
|
597
|
-
_again:
|
598
|
-
_acts = _redcloth_attributes_actions + _redcloth_attributes_to_state_actions[cs];
|
599
|
-
_nacts = (unsigned int) *_acts++;
|
600
|
-
while ( _nacts-- > 0 ) {
|
601
|
-
switch ( *_acts++ ) {
|
602
|
-
case 10:
|
603
|
-
#line 1 "ext/redcloth_scan/redcloth_attributes.rl"
|
604
|
-
{ts = 0;}
|
605
|
-
break;
|
606
|
-
case 11:
|
607
|
-
#line 1 "ext/redcloth_scan/redcloth_attributes.rl"
|
608
|
-
{act = 0;}
|
609
|
-
break;
|
610
|
-
#line 611 "ext/redcloth_scan/redcloth_attributes.c"
|
611
|
-
}
|
612
|
-
}
|
613
|
-
|
614
|
-
if ( cs == 0 )
|
615
|
-
goto _out;
|
616
|
-
if ( ++p != pe )
|
617
|
-
goto _resume;
|
618
|
-
_test_eof: {}
|
619
|
-
if ( p == eof )
|
620
|
-
{
|
621
|
-
if ( _redcloth_attributes_eof_trans[cs] > 0 ) {
|
622
|
-
_trans = _redcloth_attributes_eof_trans[cs] - 1;
|
623
|
-
goto _eof_trans;
|
624
|
-
}
|
625
|
-
}
|
626
|
-
|
627
|
-
_out: {}
|
628
|
-
}
|
629
|
-
#line 58 "ext/redcloth_scan/redcloth_attributes.rl"
|
630
|
-
|
631
|
-
return regs;
|
632
|
-
}
|
633
|
-
|
634
|
-
VALUE
|
635
|
-
redcloth_attributes(self, str)
|
636
|
-
VALUE self, str;
|
637
|
-
{
|
638
|
-
StringValue(str);
|
639
|
-
int cs = redcloth_attributes_en_inline;
|
640
|
-
return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
|
641
|
-
}
|
642
|
-
|
643
|
-
VALUE
|
644
|
-
redcloth_link_attributes(self, str)
|
645
|
-
VALUE self, str;
|
646
|
-
{
|
647
|
-
StringValue(str);
|
648
|
-
int cs = redcloth_attributes_en_link_says;
|
649
|
-
return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
|
650
|
-
}
|