Changeset 285

Show
Ignore:
Timestamp:
03/24/2008 09:57:30 (8 months ago)
Author:
jgarber
Message:

Fix code section eating up to numbers (#44).

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/redcloth_scan/redcloth_inline.rl

    r284 r285  
    5959  caps = ( upper{3,} >A %*T ) >X ; 
    6060  dim = ( digit+ >A %{ STORE(x) } (" x " @{ ASET(space, true)} | "x") digit @{ fhold; } ) >X ; 
     61  dim_noactions = digit+ ( (" x " | "x") digit+ )+ ; 
    6162  tm = [Tt] [Mm] ; 
    6263  trademark = " "? ( "[" tm "]" | "(" tm ")" ) ; 
     
    6768  entity = ( "&" %A ( '#' digit+ | alpha+ ) %T ';' ) >X ; 
    6869 
    69   other_phrase = phrase -- dim; 
     70  other_phrase = phrase -- dim_noactions; 
    7071 
    7172  code_tag := |* 
  • trunk/test/code.yml

    r272 r285  
    77in: 'Please type @cat "file.txt" > otherfile.txt@ at the prompt.' 
    88html: '<p>Please type <code>cat "file.txt" &gt; otherfile.txt</code> at the prompt.</p>' 
     9--- 
     10name: inline code escapement with digits 
     11in: |- 
     12  Regex-based string substitution with Ruby's gsub!: @"123<789".gsub!(/</, "") => "123789"@ 
     13html: |- 
     14  <p>Regex-based string substitution with Ruby&#8217;s gsub!: <code>"123&lt;789".gsub!(/&lt;/, "") =&gt; "123789"</code></p> 
    915--- 
    1016name: escaping in blockcode