Changeset 298

Show
Ignore:
Timestamp:
04/16/2008 06:21:50 (7 months ago)
Author:
jgarber
Message:

Allow a list to follow a paragraph with no space in between for backward compatibility.

Location:
trunk
Files:
2 modified

Legend:

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

    r294 r298  
    232232        END_EXTENDED();  
    233233        fgoto main;  
    234       }  
    235     }; 
     234      }       
     235    }; 
     236    CRLF list_start {  
     237      ADD_BLOCK();  
     238      list_layout = rb_ary_new();  
     239      LIST_ITEM();  
     240      fgoto list;  
     241    }; 
     242     
    236243    default => cat; 
    237244  *|; 
  • trunk/test/lists.yml

    r272 r298  
    217217        <li>Like this</li> 
    218218  </ul> 
     219--- 
     220name: ordered list immediately following paragraph 
     221desc: Normally a paragraph and a list that follows it should be separated by two newlines.  Textile-2.0.0 recognizes the list even when separated by only one newline, but creates invalid XHTML by placing the list inside the paragraph.  RedCloth recognizes the pattern for backward compatibility, but creates valid XHTML. 
     222in: |- 
     223  A simple example. 
     224  # One 
     225  # Two 
     226html: |- 
     227  <p>A simple example.</p> 
     228  <ol> 
     229        <li>One</li> 
     230        <li>Two</li> 
     231  </ol> 
     232--- 
     233name: unordered list immediately following paragraph 
     234in: |- 
     235  A simple example. 
     236  * One 
     237  * Two 
     238html: |- 
     239  <p>A simple example.</p> 
     240  <ul> 
     241        <li>One</li> 
     242        <li>Two</li> 
     243  </ul> 
     244--- 
     245name: ordered list immediately following extended block 
     246in: |- 
     247  div.. Here it comes. 
     248   
     249  A simple example. 
     250  # One 
     251  # Two 
     252html: |- 
     253  <div>Here it comes.</div> 
     254  <div>A simple example.</div> 
     255  <ol> 
     256        <li>One</li> 
     257        <li>Two</li> 
     258  </ol> 
     259--- 
     260name: unordered list immediately following extended block 
     261in: |- 
     262  div.. Here it comes. 
     263   
     264  A simple example. 
     265  * One 
     266  * Two 
     267html: |- 
     268  <div>Here it comes.</div> 
     269  <div>A simple example.</div> 
     270  <ul> 
     271        <li>One</li> 
     272        <li>Two</li> 
     273  </ul>