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.

@@ -0,0 +1,143 @@
1
+
2
+ # Gem::Specification for Redcloth-4.1.0
3
+ # Originally generated by Echoe
4
+
5
+ --- !ruby/object:Gem::Specification
6
+ name: RedCloth
7
+ version: !ruby/object:Gem::Version
8
+ version: 4.1.0
9
+ platform: ruby
10
+ authors:
11
+ - Jason Garber
12
+ autorequire:
13
+ bindir: bin
14
+
15
+ date: 2008-10-31 00:00:00 -04:00
16
+ default_executable:
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
19
+ name: echoe
20
+ type: :development
21
+ version_requirement:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: "0"
27
+ version:
28
+ description: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
29
+ email: redcloth-upwards@rubyforge.org
30
+ executables:
31
+ - redcloth
32
+ extensions:
33
+ - ext/redcloth_scan/extconf.rb
34
+ extra_rdoc_files:
35
+ - CHANGELOG
36
+ - lib/case_sensitive_require/RedCloth.rb
37
+ - lib/redcloth/erb_extension.rb
38
+ - lib/redcloth/formatters/base.rb
39
+ - lib/redcloth/formatters/html.rb
40
+ - lib/redcloth/formatters/latex.rb
41
+ - lib/redcloth/textile_doc.rb
42
+ - lib/redcloth/version.rb
43
+ - lib/redcloth.rb
44
+ - README
45
+ files:
46
+ - bin/redcloth
47
+ - CHANGELOG
48
+ - COPYING
49
+ - ext/mingw-rbconfig.rb
50
+ - ext/redcloth_scan/extconf.rb
51
+ - ext/redcloth_scan/redcloth.h
52
+ - ext/redcloth_scan/redcloth_attributes.c.rl
53
+ - ext/redcloth_scan/redcloth_attributes.java.rl
54
+ - ext/redcloth_scan/redcloth_attributes.rl
55
+ - ext/redcloth_scan/redcloth_common.c.rl
56
+ - ext/redcloth_scan/redcloth_common.java.rl
57
+ - ext/redcloth_scan/redcloth_common.rl
58
+ - ext/redcloth_scan/redcloth_inline.c.rl
59
+ - ext/redcloth_scan/redcloth_inline.java.rl
60
+ - ext/redcloth_scan/redcloth_inline.rl
61
+ - ext/redcloth_scan/redcloth_scan.c.rl
62
+ - ext/redcloth_scan/redcloth_scan.java.rl
63
+ - ext/redcloth_scan/redcloth_scan.rl
64
+ - extras/ragel_profiler.rb
65
+ - lib/case_sensitive_require/RedCloth.rb
66
+ - lib/redcloth/erb_extension.rb
67
+ - lib/redcloth/formatters/base.rb
68
+ - lib/redcloth/formatters/html.rb
69
+ - lib/redcloth/formatters/latex.rb
70
+ - lib/redcloth/formatters/latex_entities.yml
71
+ - lib/redcloth/textile_doc.rb
72
+ - lib/redcloth/version.rb
73
+ - lib/redcloth.rb
74
+ - Manifest
75
+ - Rakefile
76
+ - README
77
+ - RedCloth.gemspec
78
+ - setup.rb
79
+ - test/basic.yml
80
+ - test/code.yml
81
+ - test/definitions.yml
82
+ - test/extra_whitespace.yml
83
+ - test/filter_html.yml
84
+ - test/filter_pba.yml
85
+ - test/helper.rb
86
+ - test/html.yml
87
+ - test/images.yml
88
+ - test/instiki.yml
89
+ - test/links.yml
90
+ - test/lists.yml
91
+ - test/poignant.yml
92
+ - test/sanitize_html.yml
93
+ - test/table.yml
94
+ - test/test_custom_tags.rb
95
+ - test/test_erb.rb
96
+ - test/test_extensions.rb
97
+ - test/test_formatters.rb
98
+ - test/test_parser.rb
99
+ - test/test_restrictions.rb
100
+ - test/textism.yml
101
+ - test/threshold.yml
102
+ - test/validate_fixtures.rb
103
+ - ext/redcloth_scan/redcloth_attributes.c
104
+ - ext/redcloth_scan/redcloth_inline.c
105
+ - ext/redcloth_scan/redcloth_scan.c
106
+ has_rdoc: true
107
+ homepage: http://redcloth.org
108
+ post_install_message:
109
+ rdoc_options:
110
+ - --line-numbers
111
+ - --inline-source
112
+ - --title
113
+ - RedCloth
114
+ - --main
115
+ - README
116
+ require_paths:
117
+ - lib
118
+ - ext
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 1.8.4
124
+ version:
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: "1.2"
130
+ version:
131
+ requirements: []
132
+
133
+ rubyforge_project: redcloth
134
+ rubygems_version: 1.2.0
135
+ specification_version: 2
136
+ summary: RedCloth-4.1.0 - Textile parser for Ruby. http://redcloth.org/
137
+ test_files:
138
+ - test/test_custom_tags.rb
139
+ - test/test_erb.rb
140
+ - test/test_extensions.rb
141
+ - test/test_formatters.rb
142
+ - test/test_parser.rb
143
+ - test/test_restrictions.rb
File without changes
@@ -33,14 +33,17 @@ VALUE red_pass_code(VALUE, VALUE, VALUE, ID);
33
33
 
34
34
  /* parser macros */
35
35
  #define CLEAR_REGS() regs = rb_hash_new();
36
+ #define RESET_REG() reg = NULL
36
37
  #define CAT(H) rb_str_cat(H, ts, te-ts)
37
38
  #define CLEAR(H) H = rb_str_new2("")
38
- #define INLINE(H, T) rb_str_append(H, rb_funcall(self, rb_intern(#T), 1, regs))
39
+ #define SET_PLAIN_BLOCK(T) plain_block = rb_str_new2(T)
40
+ #define RESET_TYPE(T) rb_hash_aset(regs, ID2SYM(rb_intern("type")), plain_block)
41
+ #define INLINE(H, T) rb_str_append(H, rb_funcall(self, rb_intern(T), 1, regs))
39
42
  #define DONE(H) rb_str_append(html, H); CLEAR(H); CLEAR_REGS()
40
- #define PASS(H, A, T) rb_str_append(H, red_pass(self, regs, ID2SYM(rb_intern(#A)), rb_intern(#T), refs))
41
- #define PARSE_ATTR(A) red_parse_attr(self, regs, ID2SYM(rb_intern(#A)))
42
- #define PARSE_LINK_ATTR(A) red_parse_link_attr(self, regs, ID2SYM(rb_intern(#A)))
43
- #define PASS_CODE(H, A, T, O) rb_str_append(H, red_pass_code(self, regs, ID2SYM(rb_intern(#A)), rb_intern(#T)))
43
+ #define PASS(H, A, T) rb_str_append(H, red_pass(self, regs, ID2SYM(rb_intern(A)), rb_intern(T), refs))
44
+ #define PARSE_ATTR(A) red_parse_attr(self, regs, ID2SYM(rb_intern(A)))
45
+ #define PARSE_LINK_ATTR(A) red_parse_link_attr(self, regs, ID2SYM(rb_intern(A)))
46
+ #define PASS_CODE(H, A, T, O) rb_str_append(H, red_pass_code(self, regs, ID2SYM(rb_intern(A)), rb_intern(T)))
44
47
  #define ADD_BLOCK() \
45
48
  rb_str_append(html, red_block(self, regs, block, refs)); \
46
49
  extend = Qnil; \
@@ -48,10 +51,11 @@ VALUE red_pass_code(VALUE, VALUE, VALUE, ID);
48
51
  CLEAR_REGS()
49
52
  #define ADD_EXTENDED_BLOCK() rb_str_append(html, red_block(self, regs, block, refs)); CLEAR(block);
50
53
  #define END_EXTENDED() extend = Qnil; CLEAR_REGS();
54
+ #define IS_NOT_EXTENDED() NIL_P(extend)
51
55
  #define ADD_BLOCKCODE() rb_str_append(html, red_blockcode(self, regs, block)); CLEAR(block); CLEAR_REGS()
52
56
  #define ADD_EXTENDED_BLOCKCODE() rb_str_append(html, red_blockcode(self, regs, block)); CLEAR(block);
53
- #define ASET(T, V) rb_hash_aset(regs, ID2SYM(rb_intern(#T)), rb_str_new2(#V));
54
- #define AINC(T) red_inc(regs, ID2SYM(rb_intern(#T)));
57
+ #define ASET(T, V) rb_hash_aset(regs, ID2SYM(rb_intern(T)), rb_str_new2(V));
58
+ #define AINC(T) red_inc(regs, ID2SYM(rb_intern(T)));
55
59
  #define SET_ATTRIBUTES() \
56
60
  VALUE buf = Qnil; \
57
61
  SET_ATTRIBUTE("class_buf", "class"); \
@@ -64,26 +68,26 @@ VALUE red_pass_code(VALUE, VALUE, VALUE, ID);
64
68
  #define TRANSFORM(T) \
65
69
  if (p > reg && reg >= ts) { \
66
70
  VALUE str = redcloth_transform(self, reg, p, refs); \
67
- rb_hash_aset(regs, ID2SYM(rb_intern(#T)), str); \
68
- /* printf("TRANSFORM(" #T ") '%s' (p:'%d' reg:'%d')\n", RSTRING(str)->ptr, p, reg);*/ \
71
+ rb_hash_aset(regs, ID2SYM(rb_intern(T)), str); \
72
+ /* printf("TRANSFORM(" T ") '%s' (p:'%d' reg:'%d')\n", RSTRING(str)->ptr, p, reg);*/ \
69
73
  } else { \
70
- rb_hash_aset(regs, ID2SYM(rb_intern(#T)), Qnil); \
74
+ rb_hash_aset(regs, ID2SYM(rb_intern(T)), Qnil); \
71
75
  }
72
76
  #define STORE(T) \
73
77
  if (p > reg && reg >= ts) { \
74
78
  VALUE str = rb_str_new(reg, p-reg); \
75
- rb_hash_aset(regs, ID2SYM(rb_intern(#T)), str); \
76
- /* printf("STORE(" #T ") '%s' (p:'%d' reg:'%d')\n", RSTRING(str)->ptr, p, reg);*/ \
79
+ rb_hash_aset(regs, ID2SYM(rb_intern(T)), str); \
80
+ /* printf("STORE(" T ") '%s' (p:'%d' reg:'%d')\n", RSTRING(str)->ptr, p, reg);*/ \
77
81
  } else { \
78
- rb_hash_aset(regs, ID2SYM(rb_intern(#T)), Qnil); \
82
+ rb_hash_aset(regs, ID2SYM(rb_intern(T)), Qnil); \
79
83
  }
80
84
  #define STORE_B(T) \
81
85
  if (p > bck && bck >= ts) { \
82
86
  VALUE str = rb_str_new(bck, p-bck); \
83
- rb_hash_aset(regs, ID2SYM(rb_intern(#T)), str); \
84
- /* printf("STORE_B(" #T ") '%s' (p:'%d' reg:'%d')\n", RSTRING(str)->ptr, p, reg);*/ \
87
+ rb_hash_aset(regs, ID2SYM(rb_intern(T)), str); \
88
+ /* printf("STORE_B(" T ") '%s' (p:'%d' reg:'%d')\n", RSTRING(str)->ptr, p, reg);*/ \
85
89
  } else { \
86
- rb_hash_aset(regs, ID2SYM(rb_intern(#T)), Qnil); \
90
+ rb_hash_aset(regs, ID2SYM(rb_intern(T)), Qnil); \
87
91
  }
88
92
  #define STORE_URL(T) \
89
93
  if (p > reg && reg >= ts) { \
@@ -100,9 +104,12 @@ VALUE red_pass_code(VALUE, VALUE, VALUE, ID);
100
104
  te = p; \
101
105
  } \
102
106
  STORE(T); \
103
- if ( !NIL_P(refs) && rb_funcall(refs, rb_intern("has_key?"), 1, rb_hash_aref(regs, ID2SYM(rb_intern(#T)))) ) { \
104
- rb_hash_aset(regs, ID2SYM(rb_intern(#T)), rb_hash_aref(refs, rb_hash_aref(regs, ID2SYM(rb_intern(#T))))); \
107
+ if ( !NIL_P(refs) && rb_funcall(refs, rb_intern("has_key?"), 1, rb_hash_aref(regs, ID2SYM(rb_intern(T)))) ) { \
108
+ rb_hash_aset(regs, ID2SYM(rb_intern(T)), rb_hash_aref(refs, rb_hash_aref(regs, ID2SYM(rb_intern(T))))); \
105
109
  }
110
+ #define STORE_LINK_ALIAS() \
111
+ rb_hash_aset(refs_found, rb_hash_aref(regs, ID2SYM(rb_intern("text"))), rb_hash_aref(regs, ID2SYM(rb_intern("href"))))
112
+ #define CLEAR_LIST() list_layout = rb_ary_new()
106
113
  #define LIST_ITEM() \
107
114
  int aint = 0; \
108
115
  VALUE aval = rb_ary_entry(list_index, nest-1); \
@@ -136,11 +143,11 @@ VALUE red_pass_code(VALUE, VALUE, VALUE, ID);
136
143
  rb_str_append(html, rb_funcall(self, rb_intern(listm), 1, regs)); \
137
144
  rb_ary_store(list_layout, nest-1, rb_str_new2(list_type)); \
138
145
  CLEAR_REGS(); \
139
- ASET(first, true); \
146
+ ASET("first", "true"); \
140
147
  } \
141
148
  LIST_CLOSE(); \
142
149
  rb_hash_aset(regs, ID2SYM(rb_intern("nest")), INT2NUM(RARRAY(list_layout)->len)); \
143
- ASET(type, li_open)
150
+ ASET("type", "li_open")
144
151
  #define LIST_CLOSE() \
145
152
  while (nest < RARRAY(list_layout)->len) \
146
153
  { \
@@ -1,13 +1,13 @@
1
- #line 1 "ext/redcloth_scan/redcloth_attributes.rl"
1
+ #line 1 "ext/redcloth_scan/redcloth_attributes.c.rl"
2
2
  /*
3
- * redcloth_attributes.rl
3
+ * redcloth_attributes.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 37 "ext/redcloth_scan/redcloth_attributes.rl"
10
+ #line 15 "ext/redcloth_scan/redcloth_attributes.c.rl"
11
11
 
12
12
 
13
13
 
@@ -372,7 +372,7 @@ static const int redcloth_attributes_error = 0;
372
372
  static const int redcloth_attributes_en_inline = 93;
373
373
  static const int redcloth_attributes_en_link_says = 60;
374
374
 
375
- #line 40 "ext/redcloth_scan/redcloth_attributes.rl"
375
+ #line 18 "ext/redcloth_scan/redcloth_attributes.c.rl"
376
376
 
377
377
 
378
378
  VALUE
@@ -385,7 +385,7 @@ redcloth_attribute_parser(machine, self, p, pe)
385
385
  char *ts, *te, *reg, *bck, *eof;
386
386
  VALUE regs = rb_hash_new();
387
387
  VALUE buf = Qnil;
388
-
388
+
389
389
 
390
390
  #line 391 "ext/redcloth_scan/redcloth_attributes.c"
391
391
  {
@@ -394,8 +394,8 @@ redcloth_attribute_parser(machine, self, p, pe)
394
394
  te = 0;
395
395
  act = 0;
396
396
  }
397
- #line 54 "ext/redcloth_scan/redcloth_attributes.rl"
398
-
397
+ #line 32 "ext/redcloth_scan/redcloth_attributes.c.rl"
398
+
399
399
  cs = machine;
400
400
 
401
401
 
@@ -417,7 +417,7 @@ _resume:
417
417
  while ( _nacts-- > 0 ) {
418
418
  switch ( *_acts++ ) {
419
419
  case 12:
420
- #line 1 "ext/redcloth_scan/redcloth_attributes.rl"
420
+ #line 1 "ext/redcloth_scan/redcloth_attributes.c.rl"
421
421
  {ts = p;}
422
422
  break;
423
423
  #line 424 "ext/redcloth_scan/redcloth_attributes.c"
@@ -487,63 +487,63 @@ _eof_trans:
487
487
  switch ( *_acts++ )
488
488
  {
489
489
  case 0:
490
- #line 5 "ext/redcloth_scan/redcloth_attributes.rl"
490
+ #line 5 "ext/redcloth_scan/redcloth_attributes.c.rl"
491
491
  { reg = p; }
492
492
  break;
493
493
  case 1:
494
- #line 6 "ext/redcloth_scan/redcloth_attributes.rl"
494
+ #line 6 "ext/redcloth_scan/redcloth_attributes.c.rl"
495
495
  { bck = p; }
496
496
  break;
497
497
  case 2:
498
- #line 7 "ext/redcloth_scan/redcloth_attributes.rl"
499
- { STORE(text); }
498
+ #line 7 "ext/redcloth_scan/redcloth_attributes.c.rl"
499
+ { STORE("text"); }
500
500
  break;
501
501
  case 3:
502
- #line 8 "ext/redcloth_scan/redcloth_attributes.rl"
503
- { CLEAR_REGS(); reg = NULL; }
502
+ #line 8 "ext/redcloth_scan/redcloth_attributes.c.rl"
503
+ { CLEAR_REGS(); RESET_REG(); }
504
504
  break;
505
505
  case 4:
506
- #line 14 "ext/redcloth_scan/redcloth_attributes.rl"
507
- { STORE(class_buf) }
506
+ #line 10 "ext/redcloth_scan/redcloth_attributes.c.rl"
507
+ { STORE("class_buf"); }
508
508
  break;
509
509
  case 5:
510
- #line 14 "ext/redcloth_scan/redcloth_attributes.rl"
511
- {STORE(id_buf)}
510
+ #line 10 "ext/redcloth_scan/redcloth_attributes.c.rl"
511
+ {STORE("id_buf");}
512
512
  break;
513
513
  case 6:
514
- #line 15 "ext/redcloth_scan/redcloth_attributes.rl"
515
- { STORE(lang_buf) }
514
+ #line 11 "ext/redcloth_scan/redcloth_attributes.c.rl"
515
+ { STORE("lang_buf"); }
516
516
  break;
517
517
  case 7:
518
- #line 16 "ext/redcloth_scan/redcloth_attributes.rl"
519
- { STORE(style_buf) }
518
+ #line 12 "ext/redcloth_scan/redcloth_attributes.c.rl"
519
+ { STORE("style_buf"); }
520
520
  break;
521
521
  case 8:
522
- #line 27 "ext/redcloth_scan/redcloth_attributes.rl"
523
- { STORE(name) }
522
+ #line 23 "ext/redcloth_scan/redcloth_attributes.c.rl"
523
+ { STORE("name"); }
524
524
  break;
525
525
  case 9:
526
- #line 28 "ext/redcloth_scan/redcloth_attributes.rl"
527
- { STORE_B(name_without_attributes) }
526
+ #line 24 "ext/redcloth_scan/redcloth_attributes.c.rl"
527
+ { STORE_B("name_without_attributes"); }
528
528
  break;
529
529
  case 13:
530
- #line 1 "ext/redcloth_scan/redcloth_attributes.rl"
530
+ #line 1 "ext/redcloth_scan/redcloth_attributes.c.rl"
531
531
  {te = p+1;}
532
532
  break;
533
533
  case 14:
534
- #line 23 "ext/redcloth_scan/redcloth_attributes.rl"
534
+ #line 19 "ext/redcloth_scan/redcloth_attributes.c.rl"
535
535
  {act = 1;}
536
536
  break;
537
537
  case 15:
538
- #line 23 "ext/redcloth_scan/redcloth_attributes.rl"
538
+ #line 19 "ext/redcloth_scan/redcloth_attributes.c.rl"
539
539
  {te = p;p--;{ SET_ATTRIBUTES(); }}
540
540
  break;
541
541
  case 16:
542
- #line 23 "ext/redcloth_scan/redcloth_attributes.rl"
542
+ #line 19 "ext/redcloth_scan/redcloth_attributes.c.rl"
543
543
  {{p = ((te))-1;}{ SET_ATTRIBUTES(); }}
544
544
  break;
545
545
  case 17:
546
- #line 1 "ext/redcloth_scan/redcloth_attributes.rl"
546
+ #line 1 "ext/redcloth_scan/redcloth_attributes.c.rl"
547
547
  { switch( act ) {
548
548
  case 0:
549
549
  {{cs = 0; goto _again;}}
@@ -555,31 +555,31 @@ _eof_trans:
555
555
  }
556
556
  break;
557
557
  case 18:
558
- #line 32 "ext/redcloth_scan/redcloth_attributes.rl"
558
+ #line 28 "ext/redcloth_scan/redcloth_attributes.c.rl"
559
559
  {act = 2;}
560
560
  break;
561
561
  case 19:
562
- #line 33 "ext/redcloth_scan/redcloth_attributes.rl"
562
+ #line 29 "ext/redcloth_scan/redcloth_attributes.c.rl"
563
563
  {act = 3;}
564
564
  break;
565
565
  case 20:
566
- #line 32 "ext/redcloth_scan/redcloth_attributes.rl"
566
+ #line 28 "ext/redcloth_scan/redcloth_attributes.c.rl"
567
567
  {te = p;p--;{ SET_ATTRIBUTES(); }}
568
568
  break;
569
569
  case 21:
570
- #line 33 "ext/redcloth_scan/redcloth_attributes.rl"
570
+ #line 29 "ext/redcloth_scan/redcloth_attributes.c.rl"
571
571
  {te = p;p--;{ SET_ATTRIBUTE("name_without_attributes", "name"); }}
572
572
  break;
573
573
  case 22:
574
- #line 32 "ext/redcloth_scan/redcloth_attributes.rl"
574
+ #line 28 "ext/redcloth_scan/redcloth_attributes.c.rl"
575
575
  {{p = ((te))-1;}{ SET_ATTRIBUTES(); }}
576
576
  break;
577
577
  case 23:
578
- #line 33 "ext/redcloth_scan/redcloth_attributes.rl"
578
+ #line 29 "ext/redcloth_scan/redcloth_attributes.c.rl"
579
579
  {{p = ((te))-1;}{ SET_ATTRIBUTE("name_without_attributes", "name"); }}
580
580
  break;
581
581
  case 24:
582
- #line 1 "ext/redcloth_scan/redcloth_attributes.rl"
582
+ #line 1 "ext/redcloth_scan/redcloth_attributes.c.rl"
583
583
  { switch( act ) {
584
584
  case 2:
585
585
  {{p = ((te))-1;} SET_ATTRIBUTES(); }
@@ -600,11 +600,11 @@ _again:
600
600
  while ( _nacts-- > 0 ) {
601
601
  switch ( *_acts++ ) {
602
602
  case 10:
603
- #line 1 "ext/redcloth_scan/redcloth_attributes.rl"
603
+ #line 1 "ext/redcloth_scan/redcloth_attributes.c.rl"
604
604
  {ts = 0;}
605
605
  break;
606
606
  case 11:
607
- #line 1 "ext/redcloth_scan/redcloth_attributes.rl"
607
+ #line 1 "ext/redcloth_scan/redcloth_attributes.c.rl"
608
608
  {act = 0;}
609
609
  break;
610
610
  #line 611 "ext/redcloth_scan/redcloth_attributes.c"
@@ -626,7 +626,7 @@ _again:
626
626
 
627
627
  _out: {}
628
628
  }
629
- #line 58 "ext/redcloth_scan/redcloth_attributes.rl"
629
+ #line 36 "ext/redcloth_scan/redcloth_attributes.c.rl"
630
630
 
631
631
  return regs;
632
632
  }
@@ -0,0 +1,56 @@
1
+ /*
2
+ * redcloth_attributes.c.rl
3
+ *
4
+ * Copyright (C) 2008 Jason Garber
5
+ */
6
+ #include <ruby.h>
7
+ #include "redcloth.h"
8
+
9
+ %%{
10
+
11
+ machine redcloth_attributes;
12
+ include redcloth_common "redcloth_common.c.rl";
13
+ include redcloth_attributes "redcloth_attributes.rl";
14
+
15
+ }%%
16
+
17
+ %% write data nofinal;
18
+
19
+
20
+ VALUE
21
+ redcloth_attribute_parser(machine, self, p, pe)
22
+ int machine;
23
+ VALUE self;
24
+ char *p, *pe;
25
+ {
26
+ int cs, act;
27
+ char *ts, *te, *reg, *bck, *eof;
28
+ VALUE regs = rb_hash_new();
29
+ VALUE buf = Qnil;
30
+
31
+ %% write init;
32
+
33
+ cs = machine;
34
+
35
+ %% write exec;
36
+
37
+ return regs;
38
+ }
39
+
40
+ VALUE
41
+ redcloth_attributes(self, str)
42
+ VALUE self, str;
43
+ {
44
+ StringValue(str);
45
+ int cs = redcloth_attributes_en_inline;
46
+ return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
47
+ }
48
+
49
+ VALUE
50
+ redcloth_link_attributes(self, str)
51
+ VALUE self, str;
52
+ {
53
+ StringValue(str);
54
+ int cs = redcloth_attributes_en_link_says;
55
+ return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
56
+ }