List not rendering properly
cdemetriadis - May 13, 2008 - 09:18
| Project: | Textile |
| Version: | 5.x-2.1 |
| Component: | Documentation |
| Category: | bug report |
| Priority: | normal |
| Assigned: | trevortwining |
| Status: | won't fix |
Jump to:
Description
I've noticed than when using unordered lists (ul), the last list item (li) is broken out into it's own ul
input:
* List item one
* List item 2
* List item threeoutput:
<ul>
<li>List item one</li>
<li>List item 2</li>
</ul>
<ul>
<li>List item three</li>
</ul>I have the latest textile lib installed.

#1
I fixed this issue by replacing classTextile.php with the development version from textpattern-cms:
http://textpattern-cms.googlecode.com/svn/development/4.0/textpattern/li...
See also:
http://leapon.net/en/salvation-textile-drupal-module#comment-2238
#2
Didn't fix much. problem insists.
Have a look here http://www.joblet.gr/job/340
#3
@cdemetriadis: You have to resave the affected nodes (go to edit tab, scroll down, press save)
#4
This worked for me with the classTextile from TXP 4.0.6
Further to that, you should clear your cache - I had troubles with the "node save" technique, whereas clearing cache worked for me. You can do this in phpMyAdmin, or use the Devel module for this.
#5
The behaviour of the next() function changed in PHP 5.2.4. The array cursor is set to the next element in the beginning of the block, so calling next() returns the next line but one. So you can either change line 473 in classTextile.php to use "current()" instead of "next()", or just apply this little patch that works in any version:
472,473c472,473
< foreach($text as $line) {
< $nextline = next($line);
---
> foreach($text as $num => $line) {
> $nextline = isset($text[$num+1]) ? $text[$num+1] : false;
Regards
Chris
#6
Agreed, downloading the most recent stable version of classTextile.php from the textpattern repository and clearing the cache seems to resolve the issue.
#7
@ Chris
Thanks a lot for that textile patch. it was driving me loony.