willoller.com

Avatar

Learning to match the beat of the Old World man.

Textile ol li count bug

Just hit a bug with the Textile 2.0 library:


# Portland, OR
# Sanford, FL
# Albuquerque, NM
# San Diego, CA
# Bellingham, WA
 

Was producing:


<ol>
   <li>Portland, OR</li>
   <li>Sanford, FL</li>
   <li>Albuquerque, NM</li>
   <li>San Diego, CA   </li>
</ol>
<ol>
   <li>Bellingham, WA</li>
</ol>
 

Found the solution here:

You can work around the problem, by replacing these two lines (in the fList function in /textpattern/lib/classTextile.php):

foreach($text as $line) {
  $nextline = next($text);

 
with:

foreach($text as $nr => $line) {
  $nextline = isset($text[$nr+1]) ? $text[$nr+1] : false;

 

One Comment, Comment or Ping

  1. Mark Priddy

    Will,

    Thanks for this fix. Just came across this problem in Textile 216. Incorporated your workaround.

Reply to “Textile ol li count bug”

Before you go