I've just pushed textile 2.4 up to github should anyone wish to try out some of the new features. If you do try it out, please keep me informed of your successes or failures with it. Download instructions are at the end of this post.
What's New?
Quite a lot...
- Support for HTML comments.
- Support for extended characters in URLs.
- Support for Redcloth-style definition lists.
- More robust handling of notelists and note definitions.
- Support for linebreaks in table cells.
- Support for apostrophes following abbr/acronyms.
- Support for ordered list continuation/start control.
- More robust detection of lists so that even those which are not separated from the previous text are found.
- Customisable format for footnote refs and marks and for notelist refs.
1: Support for HTML comments.
Previously having HTML comments embedded in your textile source code could lead to broken output. You should now be able to get well formatted output even if you feed it things such as...
Here is some text with a <!-- Commented out[1] --> block. <!-- Here is a single <span>line</span> comment block --> <!-- Here is a whole multiline <span>HTML</span> Comment --> bc. <!-- Here is a comment block in a code block. -->
2: Support for extended characters in URLs.
You can now do this...
"Übermensch":https://de.wikipedia.org/wiki/Übermensch "äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ with trailing slash":https://en.wikipedia.com/ä/öüÄÖÜßç/éáóúè/àòùÉÁÓÚ/ÈÀÒÙêÊôÔâÂû/ÛåÅœŒæÆøØëËïÏ/
...and get correctly formatted links. However, if your link has non-word characters at the end then you have to use textile's link alias feature to get them correctly recognised and encoded. So for things like...
http://msdn.microsoft.net/en-us/library/cby9kycs(v=vs.80).aspx (brackets + multiple periods) http://ja.wikipedia.org/wiki/福島駅_(大阪府)/ (brackets)
...you would need to do this...
Contact "Microsoft":myalias1 or check out "福島駅":myalias2. [myalias1]http://msdn.microsoft.net/en-us/library/cby9kycs(v=vs.80).aspx [myalias2]http://ja.wikipedia.org/wiki/福島駅_(大阪府)/
3: Support for Redcloth-style definition lists.
Although PHP-textile has supported definition lists for a while, this version adds support for the redcloth definition list syntax. So you can now define lists so...
- coffee := Hot _and_ black - tea := Also hot, but a little less black - milk := Nourishing beverage for baby cows. Cold drink that goes great with cookies. =:
4: More robust handling of notelists and note definitions.
Textile is pretty picky about its notedef and notelist syntax. Prevoiusly both had to be terminated with a period. As users seem to miss these out fairly regularly I've relaxed this and now your notedefs and notelists don't need to end with a .
5: Support for linebreaks in table cells.
You should now have newlines converted into <br /> properly in tables now.
6: Support for apostrophes following abbr/acronyms.
Previously apostrophes following abbr/acronyms were not being encoded correctly, showing up as an open-single-quote mark. These should now work just fine...
NATO(North Atlantic Treaty Organisation)'s pretty big. The NHS(National Health Service)' charter states...
7: Support for ordered list continuation/start control.
When starting an ordered list you can now specify the start attribute to be applied like so...
#8 Item 8 # Item 9
And if you want to continue a list's numbering from where you previous ordered list finished you can let textile know using the continuation character...
#_ Item 10 # Item 11
8: More robust detection of lists so that even those which are not separated from the previous text are found.
I've relaxed the constraint that lists have to be separated from what comes before them by two newlines. So the following example will still correctly generate a list...
A list of colours. * Red * Green * Blue
9: Customisable format for footnote refs and marks and for notelist refs.
Some languages need a slightly different way of showing footnote references in the main text (or indeed, marking them in the foot itself) so you can now define your own format before you include classTextile.php in your project. Please look at the commit messages here and here for more details.
Getting the file...
If you do want to try it out and have an existing installation of PW or Textpattern which use textile then you can follow these steps to get the release candidate installed...
- Backup your existing classTextile.php file.
- Click here to access the new, raw, classTextile.php
- Save this over your existing file.
Edited by netcarver, 07 May 2012 - 10:07 AM.













