Changeset 266
- Timestamp:
- 03/15/2008 06:27:00 (8 months ago)
- Location:
- branches/superredcloth
- Files:
-
- 2 modified
-
ext/superredcloth_scan/superredcloth_scan.rl (modified) (4 diffs)
-
test/html.yml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/superredcloth/ext/superredcloth_scan/superredcloth_scan.rl
r265 r266 24 24 # blocks 25 25 notextile_tag_start = "<notextile>" ; 26 notextile_tag_end = "</notextile>" ;26 notextile_tag_end = "</notextile>" CRLF? ; 27 27 notextile_line = " " (( default+ ) -- CRLF) CRLF ; 28 28 notextile_block_start = ( "notextile" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ; 29 29 pre_tag_start = "<pre" [^>]* ">" (space* "<code>")? ; 30 pre_tag_end = ("</code>" space*)? "</pre>" ;30 pre_tag_end = ("</code>" space*)? "</pre>" CRLF? ; 31 31 pre_block_start = ( "pre" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ; 32 32 bc_start = ( "bc" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ; … … 59 59 block_end_tag = "</" BlockTagName space* ">" ; 60 60 html_start = indent (block_start_tag | block_empty_tag) indent ; 61 html_end = indent block_end_tag indent CRLF *;61 html_end = indent block_end_tag indent CRLF? ; 62 62 standalone_html = indent (block_start_tag | block_empty_tag | block_end_tag) indent CRLF+; 63 63 … … 98 98 99 99 html := |* 100 html_end { CAT(block); ADD_BLOCK(); fgoto main; };100 html_end { ADD_BLOCK(); CAT(html); fgoto main; }; 101 101 default => cat; 102 102 *|; … … 148 148 pre_block_start { fgoto pre_block; }; 149 149 standalone_html { CAT(block); DONE(block); }; 150 html_start { ASET(type, notextile); CAT( block); fgoto html; };150 html_start { ASET(type, notextile); CAT(html); fgoto html; }; 151 151 bc_start { INLINE(html, bc_open); ASET(type, code); plain_block = rb_str_new2("code"); fgoto bc; }; 152 152 bq_start { INLINE(html, bq_open); ASET(type, p); fgoto bq; }; -
branches/superredcloth/test/html.yml
r265 r266 55 55 </ul> 56 56 </div> 57 57 58 <p>Another paragraph.</p> 58 59 --- … … 61 62 out: '<p><em>asd</em> blabla <a href="http://google.com">google</a></p>' 62 63 --- 63 name: preserves block standalone64 name: preserves block html 64 65 in: |- 65 66 <div>123 Anystreet</div> … … 68 69 out: |- 69 70 <div>123 Anystreet</div> 70 71 71 <p foo="bar">Explicit paragraph</p> 72 72 ---