Changeset 266

Show
Ignore:
Timestamp:
03/15/2008 06:27:00 (8 months ago)
Author:
jgarber
Message:

Preserve whitespace after explicit html.

Location:
branches/superredcloth
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/superredcloth/ext/superredcloth_scan/superredcloth_scan.rl

    r265 r266  
    2424  # blocks 
    2525  notextile_tag_start = "<notextile>" ; 
    26   notextile_tag_end = "</notextile>" ; 
     26  notextile_tag_end = "</notextile>" CRLF? ; 
    2727  notextile_line = " " (( default+ ) -- CRLF) CRLF ; 
    2828  notextile_block_start = ( "notextile" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ; 
    2929  pre_tag_start = "<pre" [^>]* ">" (space* "<code>")? ; 
    30   pre_tag_end = ("</code>" space*)? "</pre>" ; 
     30  pre_tag_end = ("</code>" space*)? "</pre>" CRLF? ; 
    3131  pre_block_start = ( "pre" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ; 
    3232  bc_start = ( "bc" >A %{ STORE(type) } A C :> "." ( "." %extend | "" ) " "+ ) ; 
     
    5959  block_end_tag = "</" BlockTagName space* ">" ; 
    6060  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? ; 
    6262  standalone_html = indent (block_start_tag | block_empty_tag | block_end_tag) indent CRLF+; 
    6363 
     
    9898  
    9999  html := |* 
    100     html_end        { CAT(block); ADD_BLOCK(); fgoto main; }; 
     100    html_end        { ADD_BLOCK(); CAT(html); fgoto main; }; 
    101101    default => cat; 
    102102  *|; 
     
    148148    pre_block_start { fgoto pre_block; }; 
    149149    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; }; 
    151151    bc_start        { INLINE(html, bc_open); ASET(type, code); plain_block = rb_str_new2("code"); fgoto bc; }; 
    152152    bq_start        { INLINE(html, bq_open); ASET(type, p); fgoto bq; }; 
  • branches/superredcloth/test/html.yml

    r265 r266  
    5555  </ul> 
    5656  </div> 
     57   
    5758  <p>Another paragraph.</p> 
    5859--- 
     
    6162out: '<p><em>asd</em> blabla <a href="http://google.com">google</a></p>' 
    6263--- 
    63 name: preserves block standalone 
     64name: preserves block html 
    6465in: |- 
    6566  <div>123 Anystreet</div> 
     
    6869out: |- 
    6970  <div>123 Anystreet</div> 
    70  
    7171  <p foo="bar">Explicit paragraph</p> 
    7272---