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
@@ -0,0 +1,96 @@
|
|
1
|
+
/*
|
2
|
+
* redcloth_attributes.rl
|
3
|
+
*
|
4
|
+
* Copyright (C) 2008 Jason Garber
|
5
|
+
*/
|
6
|
+
import java.io.IOException;
|
7
|
+
|
8
|
+
import org.jruby.Ruby;
|
9
|
+
import org.jruby.RubyArray;
|
10
|
+
import org.jruby.RubyClass;
|
11
|
+
import org.jruby.RubyHash;
|
12
|
+
import org.jruby.RubyModule;
|
13
|
+
import org.jruby.RubyNumeric;
|
14
|
+
import org.jruby.RubyObject;
|
15
|
+
import org.jruby.RubyString;
|
16
|
+
import org.jruby.RubySymbol;
|
17
|
+
import org.jruby.anno.JRubyMethod;
|
18
|
+
import org.jruby.runtime.Block;
|
19
|
+
import org.jruby.runtime.CallbackFactory;
|
20
|
+
import org.jruby.runtime.builtin.IRubyObject;
|
21
|
+
import org.jruby.exceptions.RaiseException;
|
22
|
+
import org.jruby.runtime.load.BasicLibraryService;
|
23
|
+
|
24
|
+
import org.jruby.util.ByteList;
|
25
|
+
|
26
|
+
public class RedclothAttributes extends RedclothScanService.Base {
|
27
|
+
|
28
|
+
%%{
|
29
|
+
|
30
|
+
machine redcloth_attributes;
|
31
|
+
include redcloth_common "redcloth_common.java.rl";
|
32
|
+
include redcloth_attributes "redcloth_attributes.rl";
|
33
|
+
|
34
|
+
}%%
|
35
|
+
|
36
|
+
%% write data nofinal;
|
37
|
+
|
38
|
+
public void SET_ATTRIBUTES() {
|
39
|
+
SET_ATTRIBUTE("class_buf", "class");
|
40
|
+
SET_ATTRIBUTE("id_buf", "id");
|
41
|
+
SET_ATTRIBUTE("lang_buf", "lang");
|
42
|
+
SET_ATTRIBUTE("style_buf", "style");
|
43
|
+
}
|
44
|
+
|
45
|
+
public void SET_ATTRIBUTE(String B, String A) {
|
46
|
+
buf = ((RubyHash)regs).aref(runtime.newSymbol(B));
|
47
|
+
if(!buf.isNil()) {
|
48
|
+
((RubyHash)regs).aset(runtime.newSymbol(A), buf);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
private int machine;
|
53
|
+
private IRubyObject buf;
|
54
|
+
|
55
|
+
public RedclothAttributes(int machine, IRubyObject self, byte[] data, int p, int pe) {
|
56
|
+
this.runtime = self.getRuntime();
|
57
|
+
this.self = self;
|
58
|
+
|
59
|
+
// This is GROSS but necessary for EOF matching
|
60
|
+
this.data = new byte[pe+1];
|
61
|
+
System.arraycopy(data, p, this.data, 0, pe);
|
62
|
+
this.data[pe] = 0;
|
63
|
+
|
64
|
+
this.p = 0;
|
65
|
+
this.pe = pe+1;
|
66
|
+
this.eof = this.pe;
|
67
|
+
this.orig_p = 0;
|
68
|
+
this.orig_pe = this.pe;
|
69
|
+
|
70
|
+
this.regs = RubyHash.newHash(runtime);
|
71
|
+
this.buf = runtime.getNil();
|
72
|
+
this.machine = machine;
|
73
|
+
}
|
74
|
+
|
75
|
+
public IRubyObject parse() {
|
76
|
+
%% write init;
|
77
|
+
|
78
|
+
cs = machine;
|
79
|
+
|
80
|
+
%% write exec;
|
81
|
+
|
82
|
+
return regs;
|
83
|
+
}
|
84
|
+
|
85
|
+
public static IRubyObject attributes(IRubyObject self, IRubyObject str) {
|
86
|
+
ByteList bl = str.convertToString().getByteList();
|
87
|
+
int cs = redcloth_attributes_en_inline;
|
88
|
+
return new RedclothAttributes(cs, self, bl.bytes, bl.begin, bl.realSize).parse();
|
89
|
+
}
|
90
|
+
|
91
|
+
public static IRubyObject link_attributes(IRubyObject self, IRubyObject str) {
|
92
|
+
ByteList bl = str.convertToString().getByteList();
|
93
|
+
int cs = redcloth_attributes_en_link_says;
|
94
|
+
return new RedclothAttributes(cs, self, bl.bytes, bl.begin, bl.realSize).parse();
|
95
|
+
}
|
96
|
+
}
|
@@ -3,17 +3,13 @@
|
|
3
3
|
*
|
4
4
|
* Copyright (C) 2008 Jason Garber
|
5
5
|
*/
|
6
|
-
#include <ruby.h>
|
7
|
-
#include "redcloth.h"
|
8
|
-
|
9
6
|
%%{
|
10
7
|
|
11
8
|
machine redcloth_attributes;
|
12
|
-
include redcloth_common "redcloth_common.rl";
|
13
9
|
|
14
|
-
C2_CLAS = ( "(" ( [^)#]+ >A %{ STORE(class_buf) } )? ("#" [^)]+ >A %{STORE(id_buf)} )? ")" ) ;
|
15
|
-
C2_LNGE = ( "[" [^\]]+ >A %{ STORE(lang_buf) } "]" ) ;
|
16
|
-
C2_STYL = ( "{" [^}]+ >A %{ STORE(style_buf) } "}" ) ;
|
10
|
+
C2_CLAS = ( "(" ( [^)#]+ >A %{ STORE("class_buf"); } )? ("#" [^)]+ >A %{STORE("id_buf");} )? ")" ) ;
|
11
|
+
C2_LNGE = ( "[" [^\]]+ >A %{ STORE("lang_buf"); } "]" ) ;
|
12
|
+
C2_STYL = ( "{" [^}]+ >A %{ STORE("style_buf"); } "}" ) ;
|
17
13
|
C2 = ( C2_CLAS | C2_STYL | C2_LNGE )+ ;
|
18
14
|
|
19
15
|
mtext_with_attributes = ( C2 mtext >A %T ) >X ;
|
@@ -24,8 +20,8 @@
|
|
24
20
|
|
25
21
|
*|;
|
26
22
|
|
27
|
-
link_text_with_attributes = C2 "."* " "* ( mtext+ ) >A %{ STORE(name) } ;
|
28
|
-
link_text_without_attributes = ( mtext+ ) >B %{ STORE_B(name_without_attributes) } ;
|
23
|
+
link_text_with_attributes = C2 "."* " "* ( mtext+ ) >A %{ STORE("name"); } ;
|
24
|
+
link_text_without_attributes = ( mtext+ ) >B %{ STORE_B("name_without_attributes"); } ;
|
29
25
|
|
30
26
|
link_says := |*
|
31
27
|
|
@@ -34,45 +30,4 @@
|
|
34
30
|
|
35
31
|
*|;
|
36
32
|
|
37
|
-
}
|
38
|
-
|
39
|
-
%% write data nofinal;
|
40
|
-
|
41
|
-
|
42
|
-
VALUE
|
43
|
-
redcloth_attribute_parser(machine, self, p, pe)
|
44
|
-
int machine;
|
45
|
-
VALUE self;
|
46
|
-
char *p, *pe;
|
47
|
-
{
|
48
|
-
int cs, act;
|
49
|
-
char *ts, *te, *reg, *bck, *eof;
|
50
|
-
VALUE regs = rb_hash_new();
|
51
|
-
VALUE buf = Qnil;
|
52
|
-
|
53
|
-
%% write init;
|
54
|
-
|
55
|
-
cs = machine;
|
56
|
-
|
57
|
-
%% write exec;
|
58
|
-
|
59
|
-
return regs;
|
60
|
-
}
|
61
|
-
|
62
|
-
VALUE
|
63
|
-
redcloth_attributes(self, str)
|
64
|
-
VALUE self, str;
|
65
|
-
{
|
66
|
-
StringValue(str);
|
67
|
-
int cs = redcloth_attributes_en_inline;
|
68
|
-
return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
|
69
|
-
}
|
70
|
-
|
71
|
-
VALUE
|
72
|
-
redcloth_link_attributes(self, str)
|
73
|
-
VALUE self, str;
|
74
|
-
{
|
75
|
-
StringValue(str);
|
76
|
-
int cs = redcloth_attributes_en_link_says;
|
77
|
-
return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
|
78
|
-
}
|
33
|
+
}%%;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
%%{
|
2
|
+
|
3
|
+
machine redcloth_common;
|
4
|
+
include redcloth_common "redcloth_common.rl";
|
5
|
+
|
6
|
+
action esc { rb_str_cat_escaped(self, block, ts, te); }
|
7
|
+
action esc_pre { rb_str_cat_escaped_for_preformatted(self, block, ts, te); }
|
8
|
+
action ignore { rb_str_append(block, rb_funcall(self, rb_intern("ignore"), 1, regs)); }
|
9
|
+
|
10
|
+
# conditionals
|
11
|
+
action starts_line {
|
12
|
+
p == orig_p || *(p-1) == '\r' || *(p-1) == '\n' || *(p-1) == '\f'
|
13
|
+
}
|
14
|
+
action starts_phrase {
|
15
|
+
p == orig_p || *(p-1) == '\r' || *(p-1) == '\n' || *(p-1) == '\f' || *(p-1) == ' '
|
16
|
+
}
|
17
|
+
|
18
|
+
}%%;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
%%{
|
2
|
+
|
3
|
+
machine redcloth_common;
|
4
|
+
include redcloth_common "redcloth_common.rl";
|
5
|
+
|
6
|
+
action esc { strCatEscaped(self, block, data, ts, te); }
|
7
|
+
action esc_pre { strCatEscapedForPreformatted(self, block, data, ts, te); }
|
8
|
+
action ignore { ((RubyString)block).append(self.callMethod(runtime.getCurrentContext(), "ignore", regs)); }
|
9
|
+
|
10
|
+
# conditionals
|
11
|
+
action starts_line {
|
12
|
+
p == orig_p || data[(p-1)] == '\r' || data[(p-1)] == '\n' || data[(p-1)] == '\f'
|
13
|
+
}
|
14
|
+
action starts_phrase {
|
15
|
+
p == orig_p || data[(p-1)] == '\r' || data[(p-1)] == '\n' || data[(p-1)] == '\f' || data[(p-1)] == ' '
|
16
|
+
}
|
17
|
+
|
18
|
+
}%%;
|
@@ -4,12 +4,9 @@
|
|
4
4
|
|
5
5
|
action A { reg = p; }
|
6
6
|
action B { bck = p; }
|
7
|
-
action T { STORE(text); }
|
8
|
-
action X { CLEAR_REGS();
|
7
|
+
action T { STORE("text"); }
|
8
|
+
action X { CLEAR_REGS(); RESET_REG(); }
|
9
9
|
action cat { CAT(block); }
|
10
|
-
action esc { rb_str_cat_escaped(self, block, ts, te); }
|
11
|
-
action esc_pre { rb_str_cat_escaped_for_preformatted(self, block, ts, te); }
|
12
|
-
action ignore { rb_str_append(block, rb_funcall(self, rb_intern("ignore"), 1, regs)); }
|
13
10
|
|
14
11
|
# simple
|
15
12
|
LF = ( '\n' ) ;
|
@@ -17,28 +14,28 @@
|
|
17
14
|
EOF = 0 ;
|
18
15
|
|
19
16
|
# textile modifiers
|
20
|
-
A_LEFT = "<" %{ ASET(align, left) } ;
|
21
|
-
A_RIGHT = ">" %{ ASET(align, right) } ;
|
22
|
-
A_JUSTIFIED = "<>" %{ ASET(align, justify) } ;
|
23
|
-
A_CENTER = "=" %{ ASET(align, center) } ;
|
24
|
-
A_PADLEFT = "(" >A %{ AINC(padding-left) } ;
|
25
|
-
A_PADRIGHT = ")" >A %{ AINC(padding-right) } ;
|
17
|
+
A_LEFT = "<" %{ ASET("align", "left"); } ;
|
18
|
+
A_RIGHT = ">" %{ ASET("align", "right"); } ;
|
19
|
+
A_JUSTIFIED = "<>" %{ ASET("align", "justify"); } ;
|
20
|
+
A_CENTER = "=" %{ ASET("align", "center"); } ;
|
21
|
+
A_PADLEFT = "(" >A %{ AINC("padding-left"); } ;
|
22
|
+
A_PADRIGHT = ")" >A %{ AINC("padding-right"); } ;
|
26
23
|
A_HLGN = ( A_LEFT | A_RIGHT | A_JUSTIFIED | A_CENTER | A_PADLEFT | A_PADRIGHT ) ;
|
27
24
|
A_LIMIT = ( A_LEFT | A_CENTER | A_RIGHT ) ;
|
28
|
-
A_VLGN = ( "-" %{ ASET(vertical-align, middle) } | "^" %{ ASET(vertical-align, top) } | "~" %{ ASET(vertical-align, bottom) } ) ;
|
29
|
-
C_CLAS = ( "(" ( [^)#]+ >A %{ STORE(class) } )? ("#" [^)]+ >A %{STORE(id)} )? ")" ) ;
|
30
|
-
C_LNGE = ( "[" [^\]]+ >A %{ STORE(lang) } "]" ) ;
|
31
|
-
C_STYL = ( "{" [^}]+ >A %{ STORE(style) } "}" ) ;
|
32
|
-
S_CSPN = ( "\\" [0-9]+ >A %{ STORE(colspan) } ) ;
|
33
|
-
S_RSPN = ( "/" [0-9]+ >A %{ STORE(rowspan) } ) ;
|
34
|
-
D_HEADER = "_" %{ ASET(th, true) } ;
|
25
|
+
A_VLGN = ( "-" %{ ASET("vertical-align", "middle"); } | "^" %{ ASET("vertical-align", "top"); } | "~" %{ ASET("vertical-align", "bottom"); } ) ;
|
26
|
+
C_CLAS = ( "(" ( [^)#]+ >A %{ STORE("class"); } )? ("#" [^)]+ >A %{STORE("id");} )? ")" ) ;
|
27
|
+
C_LNGE = ( "[" [^\]]+ >A %{ STORE("lang"); } "]" ) ;
|
28
|
+
C_STYL = ( "{" [^}]+ >A %{ STORE("style"); } "}" ) ;
|
29
|
+
S_CSPN = ( "\\" [0-9]+ >A %{ STORE("colspan"); } ) ;
|
30
|
+
S_RSPN = ( "/" [0-9]+ >A %{ STORE("rowspan"); } ) ;
|
31
|
+
D_HEADER = "_" %{ ASET("th", "true"); } ;
|
35
32
|
A = ( ( A_HLGN | A_VLGN )* ) ;
|
36
33
|
A2 = ( A_LIMIT? ) ;
|
37
34
|
S = ( S_CSPN | S_RSPN )* ;
|
38
35
|
C = ( C_CLAS | C_STYL | C_LNGE )* ;
|
39
36
|
D = ( D_HEADER ) ;
|
40
37
|
N_CONT = "_" %{ list_continue = 1; };
|
41
|
-
N_NUM = digit+ >A %{ STORE(start) };
|
38
|
+
N_NUM = digit+ >A %{ STORE("start"); };
|
42
39
|
N = ( N_CONT | N_NUM )? ;
|
43
40
|
PUNCT = ( "!" | '"' | "#" | "$" | "%" | "&" | "'" | "," | "-" | "." | "/" | ":" | ";" | "=" | "?" | "\\" | "^" | "`" | "|" | "~" | "[" | "]" | "(" | ")" | "<" ) ;
|
44
41
|
dotspace = ("." " "*) ;
|
@@ -105,17 +102,10 @@
|
|
105
102
|
uri = (target | absolute_uri | absolute_path | rel_path) ;
|
106
103
|
|
107
104
|
# common
|
108
|
-
title = ( '(' default+ >A %{ STORE(title) } :> ')' ) ;
|
105
|
+
title = ( '(' default+ >A %{ STORE("title"); } :> ')' ) ;
|
109
106
|
word = ( alnum | safe | " " ) ;
|
110
107
|
mspace = ( ( " " | "\t" | LF )+ ) -- LF{2} ;
|
111
108
|
mtext = ( chars (mspace chars)* ) ;
|
112
109
|
|
113
|
-
# conditionals
|
114
|
-
action starts_line {
|
115
|
-
p == orig_p || *(p-1) == '\r' || *(p-1) == '\n' || *(p-1) == '\f'
|
116
|
-
}
|
117
|
-
action starts_phrase {
|
118
|
-
p == orig_p || *(p-1) == '\r' || *(p-1) == '\n' || *(p-1) == '\f' || *(p-1) == ' '
|
119
|
-
}
|
120
110
|
|
121
111
|
}%%;
|
@@ -1,13 +1,13 @@
|
|
1
|
-
#line 1 "ext/redcloth_scan/redcloth_inline.rl"
|
1
|
+
#line 1 "ext/redcloth_scan/redcloth_inline.c.rl"
|
2
2
|
/*
|
3
|
-
* redcloth_inline.rl
|
3
|
+
* redcloth_inline.c.rl
|
4
4
|
*
|
5
5
|
* Copyright (C) 2008 Jason Garber
|
6
6
|
*/
|
7
7
|
#include <ruby.h>
|
8
8
|
#include "redcloth.h"
|
9
9
|
|
10
|
-
#line
|
10
|
+
#line 15 "ext/redcloth_scan/redcloth_inline.c.rl"
|
11
11
|
|
12
12
|
|
13
13
|
|
@@ -9690,7 +9690,7 @@ static const int redcloth_inline_error = 0;
|
|
9690
9690
|
static const int redcloth_inline_en_code_tag = 2456;
|
9691
9691
|
static const int redcloth_inline_en_main = 2147;
|
9692
9692
|
|
9693
|
-
#line
|
9693
|
+
#line 18 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9694
9694
|
|
9695
9695
|
VALUE
|
9696
9696
|
red_pass(VALUE self, VALUE regs, VALUE ref, ID meth, VALUE refs)
|
@@ -9763,7 +9763,6 @@ VALUE
|
|
9763
9763
|
red_blockcode(VALUE self, VALUE regs, VALUE block)
|
9764
9764
|
{
|
9765
9765
|
VALUE btype = rb_hash_aref(regs, ID2SYM(rb_intern("type")));
|
9766
|
-
block = rb_funcall(block, rb_intern("strip"), 0);
|
9767
9766
|
if (RSTRING_LEN(block) > 0)
|
9768
9767
|
{
|
9769
9768
|
rb_hash_aset(regs, ID2SYM(rb_intern("text")), block);
|
@@ -9796,17 +9795,17 @@ redcloth_inline(self, p, pe, refs)
|
|
9796
9795
|
VALUE buf = Qnil;
|
9797
9796
|
|
9798
9797
|
|
9799
|
-
#line
|
9798
|
+
#line 9799 "ext/redcloth_scan/redcloth_inline.c"
|
9800
9799
|
{
|
9801
9800
|
cs = redcloth_inline_start;
|
9802
9801
|
ts = 0;
|
9803
9802
|
te = 0;
|
9804
9803
|
act = 0;
|
9805
9804
|
}
|
9806
|
-
#line
|
9805
|
+
#line 122 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9807
9806
|
|
9808
9807
|
|
9809
|
-
#line
|
9808
|
+
#line 9809 "ext/redcloth_scan/redcloth_inline.c"
|
9810
9809
|
{
|
9811
9810
|
int _klen;
|
9812
9811
|
unsigned int _trans;
|
@@ -9825,14 +9824,14 @@ _resume:
|
|
9825
9824
|
while ( _nacts-- > 0 ) {
|
9826
9825
|
switch ( *_acts++ ) {
|
9827
9826
|
case 1:
|
9828
|
-
#line 7 "ext/redcloth_scan/redcloth_inline.rl"
|
9829
|
-
{ STORE(text); }
|
9827
|
+
#line 7 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9828
|
+
{ STORE("text"); }
|
9830
9829
|
break;
|
9831
9830
|
case 20:
|
9832
|
-
#line 1 "ext/redcloth_scan/redcloth_inline.rl"
|
9831
|
+
#line 1 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9833
9832
|
{ts = p;}
|
9834
9833
|
break;
|
9835
|
-
#line
|
9834
|
+
#line 9835 "ext/redcloth_scan/redcloth_inline.c"
|
9836
9835
|
}
|
9837
9836
|
}
|
9838
9837
|
|
@@ -9857,7 +9856,7 @@ _resume:
|
|
9857
9856
|
case 0: {
|
9858
9857
|
_widec = (short)(640 + ((*p) - -128));
|
9859
9858
|
if (
|
9860
|
-
#line
|
9859
|
+
#line 11 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9861
9860
|
|
9862
9861
|
p == orig_p || *(p-1) == '\r' || *(p-1) == '\n' || *(p-1) == '\f'
|
9863
9862
|
) _widec += 256;
|
@@ -9866,7 +9865,7 @@ _resume:
|
|
9866
9865
|
case 1: {
|
9867
9866
|
_widec = (short)(128 + ((*p) - -128));
|
9868
9867
|
if (
|
9869
|
-
#line
|
9868
|
+
#line 14 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9870
9869
|
|
9871
9870
|
p == orig_p || *(p-1) == '\r' || *(p-1) == '\n' || *(p-1) == '\f' || *(p-1) == ' '
|
9872
9871
|
) _widec += 256;
|
@@ -9941,475 +9940,475 @@ _eof_trans:
|
|
9941
9940
|
switch ( *_acts++ )
|
9942
9941
|
{
|
9943
9942
|
case 0:
|
9944
|
-
#line 5 "ext/redcloth_scan/redcloth_inline.rl"
|
9943
|
+
#line 5 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9945
9944
|
{ reg = p; }
|
9946
9945
|
break;
|
9947
9946
|
case 1:
|
9948
|
-
#line 7 "ext/redcloth_scan/redcloth_inline.rl"
|
9949
|
-
{ STORE(text); }
|
9947
|
+
#line 7 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9948
|
+
{ STORE("text"); }
|
9950
9949
|
break;
|
9951
9950
|
case 2:
|
9952
|
-
#line 8 "ext/redcloth_scan/redcloth_inline.rl"
|
9953
|
-
{ CLEAR_REGS();
|
9951
|
+
#line 8 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9952
|
+
{ CLEAR_REGS(); RESET_REG(); }
|
9954
9953
|
break;
|
9955
9954
|
case 3:
|
9956
|
-
#line
|
9957
|
-
{ ASET(align, left) }
|
9955
|
+
#line 17 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9956
|
+
{ ASET("align", "left"); }
|
9958
9957
|
break;
|
9959
9958
|
case 4:
|
9960
|
-
#line
|
9961
|
-
{ ASET(align, right) }
|
9959
|
+
#line 18 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9960
|
+
{ ASET("align", "right"); }
|
9962
9961
|
break;
|
9963
9962
|
case 5:
|
9964
|
-
#line
|
9965
|
-
{ ASET(align, center) }
|
9963
|
+
#line 20 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9964
|
+
{ ASET("align", "center"); }
|
9966
9965
|
break;
|
9967
9966
|
case 6:
|
9968
|
-
#line
|
9969
|
-
{ STORE(class) }
|
9967
|
+
#line 26 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9968
|
+
{ STORE("class"); }
|
9970
9969
|
break;
|
9971
9970
|
case 7:
|
9972
|
-
#line
|
9973
|
-
{STORE(id)}
|
9971
|
+
#line 26 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9972
|
+
{STORE("id");}
|
9974
9973
|
break;
|
9975
9974
|
case 8:
|
9976
|
-
#line
|
9977
|
-
{ STORE(lang) }
|
9975
|
+
#line 27 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9976
|
+
{ STORE("lang"); }
|
9978
9977
|
break;
|
9979
9978
|
case 9:
|
9980
|
-
#line
|
9981
|
-
{ STORE(style) }
|
9979
|
+
#line 28 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9980
|
+
{ STORE("style"); }
|
9982
9981
|
break;
|
9983
9982
|
case 10:
|
9984
|
-
#line
|
9985
|
-
{ STORE(title) }
|
9983
|
+
#line 105 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9984
|
+
{ STORE("title"); }
|
9986
9985
|
break;
|
9987
9986
|
case 11:
|
9988
|
-
#line
|
9989
|
-
{ STORE(link_text); }
|
9987
|
+
#line 14 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9988
|
+
{ STORE("link_text"); }
|
9990
9989
|
break;
|
9991
9990
|
case 12:
|
9992
|
-
#line
|
9993
|
-
{ STORE_URL(href); }
|
9991
|
+
#line 16 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9992
|
+
{ STORE_URL("href"); }
|
9994
9993
|
break;
|
9995
9994
|
case 13:
|
9996
|
-
#line
|
9997
|
-
{ STORE(href); }
|
9995
|
+
#line 18 "ext/redcloth_scan/redcloth_inline.c.rl"
|
9996
|
+
{ STORE("href"); }
|
9998
9997
|
break;
|
9999
9998
|
case 14:
|
10000
|
-
#line
|
10001
|
-
{ STORE(src) }
|
9999
|
+
#line 21 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10000
|
+
{ STORE("src"); }
|
10002
10001
|
break;
|
10003
10002
|
case 15:
|
10004
|
-
#line
|
10005
|
-
{ STORE_URL(href); }
|
10003
|
+
#line 23 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10004
|
+
{ STORE_URL("href"); }
|
10006
10005
|
break;
|
10007
10006
|
case 16:
|
10008
|
-
#line
|
10007
|
+
#line 30 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10009
10008
|
{ p--; }
|
10010
10009
|
break;
|
10011
10010
|
case 17:
|
10012
|
-
#line
|
10013
|
-
{ STORE(beginning_space); }
|
10011
|
+
#line 42 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10012
|
+
{ STORE("beginning_space"); }
|
10014
10013
|
break;
|
10015
10014
|
case 18:
|
10016
|
-
#line
|
10017
|
-
{ STORE(title) }
|
10015
|
+
#line 73 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10016
|
+
{ STORE("title"); }
|
10018
10017
|
break;
|
10019
10018
|
case 21:
|
10020
|
-
#line 1 "ext/redcloth_scan/redcloth_inline.rl"
|
10019
|
+
#line 1 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10021
10020
|
{te = p+1;}
|
10022
10021
|
break;
|
10023
10022
|
case 22:
|
10024
|
-
#line
|
10023
|
+
#line 94 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10025
10024
|
{te = p+1;{ CAT(block); {cs = 2147; goto _again;} }}
|
10026
10025
|
break;
|
10027
10026
|
case 23:
|
10028
|
-
#line
|
10027
|
+
#line 7 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10029
10028
|
{te = p+1;{ rb_str_cat_escaped_for_preformatted(self, block, ts, te); }}
|
10030
10029
|
break;
|
10031
10030
|
case 24:
|
10032
|
-
#line
|
10031
|
+
#line 7 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10033
10032
|
{te = p;p--;{ rb_str_cat_escaped_for_preformatted(self, block, ts, te); }}
|
10034
10033
|
break;
|
10035
10034
|
case 25:
|
10036
|
-
#line
|
10035
|
+
#line 7 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10037
10036
|
{{p = ((te))-1;}{ rb_str_cat_escaped_for_preformatted(self, block, ts, te); }}
|
10038
10037
|
break;
|
10039
10038
|
case 26:
|
10040
|
-
#line
|
10039
|
+
#line 102 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10041
10040
|
{act = 4;}
|
10042
10041
|
break;
|
10043
10042
|
case 27:
|
10044
|
-
#line
|
10043
|
+
#line 106 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10045
10044
|
{act = 7;}
|
10046
10045
|
break;
|
10047
10046
|
case 28:
|
10048
|
-
#line
|
10047
|
+
#line 108 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10049
10048
|
{act = 9;}
|
10050
10049
|
break;
|
10051
10050
|
case 29:
|
10052
|
-
#line
|
10051
|
+
#line 110 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10053
10052
|
{act = 11;}
|
10054
10053
|
break;
|
10055
10054
|
case 30:
|
10056
|
-
#line
|
10055
|
+
#line 124 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10057
10056
|
{act = 25;}
|
10058
10057
|
break;
|
10059
10058
|
case 31:
|
10060
|
-
#line
|
10059
|
+
#line 125 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10061
10060
|
{act = 26;}
|
10062
10061
|
break;
|
10063
10062
|
case 32:
|
10064
|
-
#line
|
10063
|
+
#line 126 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10065
10064
|
{act = 27;}
|
10066
10065
|
break;
|
10067
10066
|
case 33:
|
10068
|
-
#line
|
10067
|
+
#line 128 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10069
10068
|
{act = 28;}
|
10070
10069
|
break;
|
10071
10070
|
case 34:
|
10072
|
-
#line
|
10071
|
+
#line 132 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10073
10072
|
{act = 32;}
|
10074
10073
|
break;
|
10075
10074
|
case 35:
|
10076
|
-
#line
|
10075
|
+
#line 141 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10077
10076
|
{act = 40;}
|
10078
10077
|
break;
|
10079
10078
|
case 36:
|
10080
|
-
#line
|
10079
|
+
#line 142 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10081
10080
|
{act = 41;}
|
10082
10081
|
break;
|
10083
10082
|
case 37:
|
10084
|
-
#line
|
10083
|
+
#line 144 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10085
10084
|
{act = 43;}
|
10086
10085
|
break;
|
10087
10086
|
case 38:
|
10088
|
-
#line
|
10087
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10089
10088
|
{act = 46;}
|
10090
10089
|
break;
|
10091
10090
|
case 39:
|
10092
|
-
#line
|
10091
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10093
10092
|
{act = 47;}
|
10094
10093
|
break;
|
10095
10094
|
case 40:
|
10096
|
-
#line
|
10095
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10097
10096
|
{act = 48;}
|
10098
10097
|
break;
|
10099
10098
|
case 41:
|
10100
|
-
#line
|
10101
|
-
{te = p+1;{ INLINE(block, image); }}
|
10099
|
+
#line 100 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10100
|
+
{te = p+1;{ INLINE(block, "image"); }}
|
10102
10101
|
break;
|
10103
10102
|
case 42:
|
10104
|
-
#line
|
10105
|
-
{te = p+1;{ PARSE_LINK_ATTR(link_text); PASS(block, name, link); }}
|
10103
|
+
#line 103 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10104
|
+
{te = p+1;{ PARSE_LINK_ATTR("link_text"); PASS(block, "name", "link"); }}
|
10106
10105
|
break;
|
10107
10106
|
case 43:
|
10108
|
-
#line
|
10109
|
-
{te = p+1;{ PARSE_ATTR(text); PASS_CODE(block, text, code, opts); }}
|
10107
|
+
#line 105 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10108
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS_CODE(block, "text", "code", opts); }}
|
10110
10109
|
break;
|
10111
10110
|
case 44:
|
10112
|
-
#line
|
10111
|
+
#line 106 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10113
10112
|
{te = p+1;{ CAT(block); {cs = 2456; goto _again;} }}
|
10114
10113
|
break;
|
10115
10114
|
case 45:
|
10116
|
-
#line
|
10117
|
-
{te = p+1;{ INLINE(block, notextile); }}
|
10115
|
+
#line 107 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10116
|
+
{te = p+1;{ INLINE(block, "notextile"); }}
|
10118
10117
|
break;
|
10119
10118
|
case 46:
|
10120
|
-
#line
|
10121
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, strong); }}
|
10119
|
+
#line 108 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10120
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "strong"); }}
|
10122
10121
|
break;
|
10123
10122
|
case 47:
|
10124
|
-
#line
|
10125
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, b); }}
|
10123
|
+
#line 109 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10124
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "b"); }}
|
10126
10125
|
break;
|
10127
10126
|
case 48:
|
10128
|
-
#line
|
10129
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, em); }}
|
10127
|
+
#line 110 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10128
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "em"); }}
|
10130
10129
|
break;
|
10131
10130
|
case 49:
|
10132
|
-
#line
|
10133
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, i); }}
|
10131
|
+
#line 111 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10132
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "i"); }}
|
10134
10133
|
break;
|
10135
10134
|
case 50:
|
10136
|
-
#line
|
10137
|
-
{te = p+1;{ PASS(block, text, del); }}
|
10135
|
+
#line 112 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10136
|
+
{te = p+1;{ PASS(block, "text", "del"); }}
|
10138
10137
|
break;
|
10139
10138
|
case 51:
|
10140
|
-
#line
|
10141
|
-
{te = p+1;{ PASS(block, text, del_phrase); }}
|
10139
|
+
#line 113 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10140
|
+
{te = p+1;{ PASS(block, "text", "del_phrase"); }}
|
10142
10141
|
break;
|
10143
10142
|
case 52:
|
10144
|
-
#line
|
10145
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, ins); }}
|
10143
|
+
#line 114 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10144
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "ins"); }}
|
10146
10145
|
break;
|
10147
10146
|
case 53:
|
10148
|
-
#line
|
10149
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, sup); }}
|
10147
|
+
#line 115 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10148
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "sup"); }}
|
10150
10149
|
break;
|
10151
10150
|
case 54:
|
10152
|
-
#line
|
10153
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, sup_phrase); }}
|
10151
|
+
#line 116 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10152
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "sup_phrase"); }}
|
10154
10153
|
break;
|
10155
10154
|
case 55:
|
10156
|
-
#line
|
10157
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, sub); }}
|
10155
|
+
#line 117 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10156
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "sub"); }}
|
10158
10157
|
break;
|
10159
10158
|
case 56:
|
10160
|
-
#line
|
10161
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, sub_phrase); }}
|
10159
|
+
#line 118 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10160
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "sub_phrase"); }}
|
10162
10161
|
break;
|
10163
10162
|
case 57:
|
10164
|
-
#line
|
10165
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, span); }}
|
10163
|
+
#line 119 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10164
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "span"); }}
|
10166
10165
|
break;
|
10167
10166
|
case 58:
|
10168
|
-
#line
|
10169
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, span_phrase); }}
|
10167
|
+
#line 120 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10168
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "span_phrase"); }}
|
10170
10169
|
break;
|
10171
10170
|
case 59:
|
10172
|
-
#line
|
10173
|
-
{te = p+1;{ PARSE_ATTR(text); PASS(block, text, cite); }}
|
10171
|
+
#line 121 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10172
|
+
{te = p+1;{ PARSE_ATTR("text"); PASS(block, "text", "cite"); }}
|
10174
10173
|
break;
|
10175
10174
|
case 60:
|
10176
|
-
#line
|
10175
|
+
#line 8 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10177
10176
|
{te = p+1;{ rb_str_append(block, rb_funcall(self, rb_intern("ignore"), 1, regs)); }}
|
10178
10177
|
break;
|
10179
10178
|
case 61:
|
10180
|
-
#line
|
10181
|
-
{te = p+1;{ PASS(block, text, snip); }}
|
10179
|
+
#line 123 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10180
|
+
{te = p+1;{ PASS(block, "text", "snip"); }}
|
10182
10181
|
break;
|
10183
10182
|
case 62:
|
10184
|
-
#line
|
10185
|
-
{te = p+1;{ PASS(block, text, quote1); }}
|
10183
|
+
#line 124 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10184
|
+
{te = p+1;{ PASS(block, "text", "quote1"); }}
|
10186
10185
|
break;
|
10187
10186
|
case 63:
|
10188
|
-
#line
|
10189
|
-
{te = p+1;{ PASS(block, text, quote2); }}
|
10187
|
+
#line 125 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10188
|
+
{te = p+1;{ PASS(block, "text", "quote2"); }}
|
10190
10189
|
break;
|
10191
10190
|
case 64:
|
10192
|
-
#line
|
10193
|
-
{te = p+1;{ INLINE(block, ellipsis); }}
|
10191
|
+
#line 128 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10192
|
+
{te = p+1;{ INLINE(block, "ellipsis"); }}
|
10194
10193
|
break;
|
10195
10194
|
case 65:
|
10196
|
-
#line
|
10197
|
-
{te = p+1;{ INLINE(block, emdash); }}
|
10195
|
+
#line 129 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10196
|
+
{te = p+1;{ INLINE(block, "emdash"); }}
|
10198
10197
|
break;
|
10199
10198
|
case 66:
|
10200
|
-
#line
|
10201
|
-
{te = p+1;{ INLINE(block, endash); }}
|
10199
|
+
#line 130 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10200
|
+
{te = p+1;{ INLINE(block, "endash"); }}
|
10202
10201
|
break;
|
10203
10202
|
case 67:
|
10204
|
-
#line
|
10205
|
-
{te = p+1;{ INLINE(block, arrow); }}
|
10203
|
+
#line 131 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10204
|
+
{te = p+1;{ INLINE(block, "arrow"); }}
|
10206
10205
|
break;
|
10207
10206
|
case 68:
|
10208
|
-
#line
|
10209
|
-
{te = p+1;{ INLINE(block, acronym); }}
|
10207
|
+
#line 133 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10208
|
+
{te = p+1;{ INLINE(block, "acronym"); }}
|
10210
10209
|
break;
|
10211
10210
|
case 69:
|
10212
|
-
#line
|
10213
|
-
{te = p+1;{ INLINE(block, trademark); }}
|
10211
|
+
#line 135 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10212
|
+
{te = p+1;{ INLINE(block, "trademark"); }}
|
10214
10213
|
break;
|
10215
10214
|
case 70:
|
10216
|
-
#line
|
10217
|
-
{te = p+1;{ INLINE(block, registered); }}
|
10215
|
+
#line 136 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10216
|
+
{te = p+1;{ INLINE(block, "registered"); }}
|
10218
10217
|
break;
|
10219
10218
|
case 71:
|
10220
|
-
#line
|
10221
|
-
{te = p+1;{ INLINE(block, copyright); }}
|
10219
|
+
#line 137 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10220
|
+
{te = p+1;{ INLINE(block, "copyright"); }}
|
10222
10221
|
break;
|
10223
10222
|
case 72:
|
10224
|
-
#line
|
10225
|
-
{te = p+1;{ PASS(block, text, footno); }}
|
10223
|
+
#line 138 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10224
|
+
{te = p+1;{ PASS(block, "text", "footno"); }}
|
10226
10225
|
break;
|
10227
10226
|
case 73:
|
10228
|
-
#line
|
10229
|
-
{te = p+1;{ INLINE(block, entity); }}
|
10227
|
+
#line 139 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10228
|
+
{te = p+1;{ INLINE(block, "entity"); }}
|
10230
10229
|
break;
|
10231
10230
|
case 74:
|
10232
|
-
#line
|
10233
|
-
{te = p+1;{ INLINE(block, inline_redcloth_version); }}
|
10231
|
+
#line 147 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10232
|
+
{te = p+1;{ INLINE(block, "inline_redcloth_version"); }}
|
10234
10233
|
break;
|
10235
10234
|
case 75:
|
10236
|
-
#line
|
10235
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10237
10236
|
{te = p+1;{ rb_str_cat_escaped(self, block, ts, te); }}
|
10238
10237
|
break;
|
10239
10238
|
case 76:
|
10240
|
-
#line
|
10239
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10241
10240
|
{te = p+1;{ rb_str_cat_escaped(self, block, ts, te); }}
|
10242
10241
|
break;
|
10243
10242
|
case 77:
|
10244
|
-
#line
|
10243
|
+
#line 153 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10245
10244
|
{te = p+1;}
|
10246
10245
|
break;
|
10247
10246
|
case 78:
|
10248
|
-
#line
|
10249
|
-
{te = p;p--;{ INLINE(block, image); }}
|
10247
|
+
#line 100 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10248
|
+
{te = p;p--;{ INLINE(block, "image"); }}
|
10250
10249
|
break;
|
10251
10250
|
case 79:
|
10252
|
-
#line
|
10253
|
-
{te = p;p--;{ PARSE_LINK_ATTR(link_text); PASS(block, name, link); }}
|
10251
|
+
#line 102 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10252
|
+
{te = p;p--;{ PARSE_LINK_ATTR("link_text"); PASS(block, "name", "link"); }}
|
10254
10253
|
break;
|
10255
10254
|
case 80:
|
10256
|
-
#line
|
10257
|
-
{te = p;p--;{ PARSE_ATTR(text); PASS_CODE(block, text, code, opts); }}
|
10255
|
+
#line 105 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10256
|
+
{te = p;p--;{ PARSE_ATTR("text"); PASS_CODE(block, "text", "code", opts); }}
|
10258
10257
|
break;
|
10259
10258
|
case 81:
|
10260
|
-
#line
|
10259
|
+
#line 106 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10261
10260
|
{te = p;p--;{ CAT(block); {cs = 2456; goto _again;} }}
|
10262
10261
|
break;
|
10263
10262
|
case 82:
|
10264
|
-
#line
|
10265
|
-
{te = p;p--;{ PARSE_ATTR(text); PASS(block, text, strong); }}
|
10263
|
+
#line 108 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10264
|
+
{te = p;p--;{ PARSE_ATTR("text"); PASS(block, "text", "strong"); }}
|
10266
10265
|
break;
|
10267
10266
|
case 83:
|
10268
|
-
#line
|
10269
|
-
{te = p;p--;{ PARSE_ATTR(text); PASS(block, text, b); }}
|
10267
|
+
#line 109 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10268
|
+
{te = p;p--;{ PARSE_ATTR("text"); PASS(block, "text", "b"); }}
|
10270
10269
|
break;
|
10271
10270
|
case 84:
|
10272
|
-
#line
|
10273
|
-
{te = p;p--;{ PARSE_ATTR(text); PASS(block, text, em); }}
|
10271
|
+
#line 110 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10272
|
+
{te = p;p--;{ PARSE_ATTR("text"); PASS(block, "text", "em"); }}
|
10274
10273
|
break;
|
10275
10274
|
case 85:
|
10276
|
-
#line
|
10277
|
-
{te = p;p--;{ PARSE_ATTR(text); PASS(block, text, i); }}
|
10275
|
+
#line 111 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10276
|
+
{te = p;p--;{ PARSE_ATTR("text"); PASS(block, "text", "i"); }}
|
10278
10277
|
break;
|
10279
10278
|
case 86:
|
10280
|
-
#line
|
10281
|
-
{te = p;p--;{ PARSE_ATTR(text); PASS(block, text, ins); }}
|
10279
|
+
#line 114 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10280
|
+
{te = p;p--;{ PARSE_ATTR("text"); PASS(block, "text", "ins"); }}
|
10282
10281
|
break;
|
10283
10282
|
case 87:
|
10284
|
-
#line
|
10285
|
-
{te = p;p--;{ PARSE_ATTR(text); PASS(block, text, cite); }}
|
10283
|
+
#line 121 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10284
|
+
{te = p;p--;{ PARSE_ATTR("text"); PASS(block, "text", "cite"); }}
|
10286
10285
|
break;
|
10287
10286
|
case 88:
|
10288
|
-
#line
|
10287
|
+
#line 8 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10289
10288
|
{te = p;p--;{ rb_str_append(block, rb_funcall(self, rb_intern("ignore"), 1, regs)); }}
|
10290
10289
|
break;
|
10291
10290
|
case 89:
|
10292
|
-
#line
|
10293
|
-
{te = p;p--;{ PASS(block, text, snip); }}
|
10291
|
+
#line 123 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10292
|
+
{te = p;p--;{ PASS(block, "text", "snip"); }}
|
10294
10293
|
break;
|
10295
10294
|
case 90:
|
10296
|
-
#line
|
10297
|
-
{te = p;p--;{ PASS(block, text, quote2); }}
|
10295
|
+
#line 125 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10296
|
+
{te = p;p--;{ PASS(block, "text", "quote2"); }}
|
10298
10297
|
break;
|
10299
10298
|
case 91:
|
10300
|
-
#line
|
10301
|
-
{te = p;p--;{ PASS(block, text, multi_paragraph_quote); }}
|
10299
|
+
#line 126 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10300
|
+
{te = p;p--;{ PASS(block, "text", "multi_paragraph_quote"); }}
|
10302
10301
|
break;
|
10303
10302
|
case 92:
|
10304
|
-
#line
|
10305
|
-
{te = p;p--;{ INLINE(block, ellipsis); }}
|
10303
|
+
#line 128 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10304
|
+
{te = p;p--;{ INLINE(block, "ellipsis"); }}
|
10306
10305
|
break;
|
10307
10306
|
case 93:
|
10308
|
-
#line
|
10309
|
-
{te = p;p--;{ INLINE(block, caps); }}
|
10307
|
+
#line 132 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10308
|
+
{te = p;p--;{ INLINE(block, "caps"); }}
|
10310
10309
|
break;
|
10311
10310
|
case 94:
|
10312
|
-
#line
|
10313
|
-
{te = p;p--;{ INLINE(block, dim); }}
|
10311
|
+
#line 134 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10312
|
+
{te = p;p--;{ INLINE(block, "dim"); }}
|
10314
10313
|
break;
|
10315
10314
|
case 95:
|
10316
|
-
#line
|
10317
|
-
{te = p;p--;{ INLINE(block, inline_html); }}
|
10315
|
+
#line 141 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10316
|
+
{te = p;p--;{ INLINE(block, "inline_html"); }}
|
10318
10317
|
break;
|
10319
10318
|
case 96:
|
10320
|
-
#line
|
10321
|
-
{te = p;p--;{ INLINE(block, inline_html); }}
|
10319
|
+
#line 142 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10320
|
+
{te = p;p--;{ INLINE(block, "inline_html"); }}
|
10322
10321
|
break;
|
10323
10322
|
case 97:
|
10324
|
-
#line
|
10325
|
-
{te = p;p--;{ INLINE(block, inline_html); }}
|
10323
|
+
#line 143 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10324
|
+
{te = p;p--;{ INLINE(block, "inline_html"); }}
|
10326
10325
|
break;
|
10327
10326
|
case 98:
|
10328
|
-
#line
|
10329
|
-
{te = p;p--;{ INLINE(block, inline_html); }}
|
10327
|
+
#line 144 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10328
|
+
{te = p;p--;{ INLINE(block, "inline_html"); }}
|
10330
10329
|
break;
|
10331
10330
|
case 99:
|
10332
|
-
#line
|
10333
|
-
{te = p;p--;{ INLINE(block, inline_html); }}
|
10331
|
+
#line 145 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10332
|
+
{te = p;p--;{ INLINE(block, "inline_html"); }}
|
10334
10333
|
break;
|
10335
10334
|
case 100:
|
10336
|
-
#line
|
10335
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10337
10336
|
{te = p;p--;{ rb_str_cat_escaped(self, block, ts, te); }}
|
10338
10337
|
break;
|
10339
10338
|
case 101:
|
10340
|
-
#line
|
10339
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10341
10340
|
{te = p;p--;{ rb_str_cat_escaped(self, block, ts, te); }}
|
10342
10341
|
break;
|
10343
10342
|
case 102:
|
10344
|
-
#line
|
10343
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10345
10344
|
{te = p;p--;{ rb_str_cat_escaped(self, block, ts, te); }}
|
10346
10345
|
break;
|
10347
10346
|
case 103:
|
10348
|
-
#line
|
10349
|
-
{{p = ((te))-1;}{ INLINE(block, image); }}
|
10347
|
+
#line 100 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10348
|
+
{{p = ((te))-1;}{ INLINE(block, "image"); }}
|
10350
10349
|
break;
|
10351
10350
|
case 104:
|
10352
|
-
#line
|
10353
|
-
{{p = ((te))-1;}{ PARSE_LINK_ATTR(link_text); PASS(block, name, link); }}
|
10351
|
+
#line 102 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10352
|
+
{{p = ((te))-1;}{ PARSE_LINK_ATTR("link_text"); PASS(block, "name", "link"); }}
|
10354
10353
|
break;
|
10355
10354
|
case 105:
|
10356
|
-
#line
|
10357
|
-
{{p = ((te))-1;}{ INLINE(block, dim); }}
|
10355
|
+
#line 134 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10356
|
+
{{p = ((te))-1;}{ INLINE(block, "dim"); }}
|
10358
10357
|
break;
|
10359
10358
|
case 106:
|
10360
|
-
#line
|
10361
|
-
{{p = ((te))-1;}{ INLINE(block, inline_html); }}
|
10359
|
+
#line 142 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10360
|
+
{{p = ((te))-1;}{ INLINE(block, "inline_html"); }}
|
10362
10361
|
break;
|
10363
10362
|
case 107:
|
10364
|
-
#line
|
10363
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10365
10364
|
{{p = ((te))-1;}{ rb_str_cat_escaped(self, block, ts, te); }}
|
10366
10365
|
break;
|
10367
10366
|
case 108:
|
10368
|
-
#line
|
10367
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10369
10368
|
{{p = ((te))-1;}{ rb_str_cat_escaped(self, block, ts, te); }}
|
10370
10369
|
break;
|
10371
10370
|
case 109:
|
10372
|
-
#line
|
10371
|
+
#line 6 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10373
10372
|
{{p = ((te))-1;}{ rb_str_cat_escaped(self, block, ts, te); }}
|
10374
10373
|
break;
|
10375
10374
|
case 110:
|
10376
|
-
#line 1 "ext/redcloth_scan/redcloth_inline.rl"
|
10375
|
+
#line 1 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10377
10376
|
{ switch( act ) {
|
10378
10377
|
case 4:
|
10379
|
-
{{p = ((te))-1;} PARSE_LINK_ATTR(link_text); PASS(block, name, link); }
|
10378
|
+
{{p = ((te))-1;} PARSE_LINK_ATTR("link_text"); PASS(block, "name", "link"); }
|
10380
10379
|
break;
|
10381
10380
|
case 7:
|
10382
10381
|
{{p = ((te))-1;} CAT(block); {cs = 2456; goto _again;} }
|
10383
10382
|
break;
|
10384
10383
|
case 9:
|
10385
|
-
{{p = ((te))-1;} PARSE_ATTR(text); PASS(block, text, strong); }
|
10384
|
+
{{p = ((te))-1;} PARSE_ATTR("text"); PASS(block, "text", "strong"); }
|
10386
10385
|
break;
|
10387
10386
|
case 11:
|
10388
|
-
{{p = ((te))-1;} PARSE_ATTR(text); PASS(block, text, em); }
|
10387
|
+
{{p = ((te))-1;} PARSE_ATTR("text"); PASS(block, "text", "em"); }
|
10389
10388
|
break;
|
10390
10389
|
case 25:
|
10391
|
-
{{p = ((te))-1;} PASS(block, text, quote1); }
|
10390
|
+
{{p = ((te))-1;} PASS(block, "text", "quote1"); }
|
10392
10391
|
break;
|
10393
10392
|
case 26:
|
10394
|
-
{{p = ((te))-1;} PASS(block, text, quote2); }
|
10393
|
+
{{p = ((te))-1;} PASS(block, "text", "quote2"); }
|
10395
10394
|
break;
|
10396
10395
|
case 27:
|
10397
|
-
{{p = ((te))-1;} PASS(block, text, multi_paragraph_quote); }
|
10396
|
+
{{p = ((te))-1;} PASS(block, "text", "multi_paragraph_quote"); }
|
10398
10397
|
break;
|
10399
10398
|
case 28:
|
10400
|
-
{{p = ((te))-1;} INLINE(block, ellipsis); }
|
10399
|
+
{{p = ((te))-1;} INLINE(block, "ellipsis"); }
|
10401
10400
|
break;
|
10402
10401
|
case 32:
|
10403
|
-
{{p = ((te))-1;} INLINE(block, caps); }
|
10402
|
+
{{p = ((te))-1;} INLINE(block, "caps"); }
|
10404
10403
|
break;
|
10405
10404
|
case 40:
|
10406
|
-
{{p = ((te))-1;} INLINE(block, inline_html); }
|
10405
|
+
{{p = ((te))-1;} INLINE(block, "inline_html"); }
|
10407
10406
|
break;
|
10408
10407
|
case 41:
|
10409
|
-
{{p = ((te))-1;} INLINE(block, inline_html); }
|
10408
|
+
{{p = ((te))-1;} INLINE(block, "inline_html"); }
|
10410
10409
|
break;
|
10411
10410
|
case 43:
|
10412
|
-
{{p = ((te))-1;} INLINE(block, inline_html); }
|
10411
|
+
{{p = ((te))-1;} INLINE(block, "inline_html"); }
|
10413
10412
|
break;
|
10414
10413
|
case 46:
|
10415
10414
|
{{p = ((te))-1;} rb_str_cat_escaped(self, block, ts, te); }
|
@@ -10423,7 +10422,7 @@ _eof_trans:
|
|
10423
10422
|
}
|
10424
10423
|
}
|
10425
10424
|
break;
|
10426
|
-
#line
|
10425
|
+
#line 10426 "ext/redcloth_scan/redcloth_inline.c"
|
10427
10426
|
}
|
10428
10427
|
}
|
10429
10428
|
|
@@ -10433,10 +10432,10 @@ _again:
|
|
10433
10432
|
while ( _nacts-- > 0 ) {
|
10434
10433
|
switch ( *_acts++ ) {
|
10435
10434
|
case 19:
|
10436
|
-
#line 1 "ext/redcloth_scan/redcloth_inline.rl"
|
10435
|
+
#line 1 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10437
10436
|
{ts = 0;}
|
10438
10437
|
break;
|
10439
|
-
#line
|
10438
|
+
#line 10439 "ext/redcloth_scan/redcloth_inline.c"
|
10440
10439
|
}
|
10441
10440
|
}
|
10442
10441
|
|
@@ -10455,7 +10454,7 @@ _again:
|
|
10455
10454
|
|
10456
10455
|
_out: {}
|
10457
10456
|
}
|
10458
|
-
#line
|
10457
|
+
#line 124 "ext/redcloth_scan/redcloth_inline.c.rl"
|
10459
10458
|
|
10460
10459
|
return block;
|
10461
10460
|
}
|