You are not logged in.
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.
Quite a lot…
And here are some examples of the above to help you get started
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 --> block.
<!-- Here is a single <span>line</span> comment block -->
<!-- Here is a whole multiline <span>HTML</span> Comment -->
2: Support for extended characters in URLs.
You can now do this…
"äöüÄÖÜßçéáóúèàòùÉÁÓÚÈÀÒÙêÊôÔâÂûÛåÅœŒæÆøØëËïÏ 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)
…you would need to do this…
Contact "Microsoft":myalias1 or check out "福島駅":myalias2.
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.
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…
Last edited by net-carver (2012-05-07 15:10:09)
Awesome work Steve, I’ve been tracking the changes through GitHub past few days. Will give it a try out over next couple of days and see if I can break it at all.
This looks very interesting, Steve! I will give it a try in the weekend.
#7, #_ I like mucho :)
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Awesome work. Love the continuation ordered lists feature.
Not sure this is the right place to bring this up, but I wonder if the ordered list syntax could be extended further to add the type attribute. Off the top of my head I suppose it might work like this:
# Regular numeric list #(class) Regular numeric with class #4(class) Regular numeric with class, starting at 4 #i Roman numeral list #A(class) Captial letter list, with class #4I(class) Capital roman numerals starting at 4, with class #_a Continuation from the previous list, as alphabetical characters
Can the ol regex be extended to allow an optional letter as well as a number, with the letter rendered as a
type attribute? There’s no need to support
type="1" because that is implicit, so it’s really only distinguishing between upper and lower case ‘a’ and ‘i’ as modifiers.
Am I dreaming, or is this possible to sneak in? My regex-fu has gone off the boil so my random hackings along the following lines have so far failed:
I tried that, pulling the new parenthical element into a
$ty variable, but it just broke everything. Probably something to do with greediness, or that I’m a tube1.
If you think it’s worthwhile pursuing I’ll raise a ticket, but if you’ve tried and decided it wasn’t worth the hassle then I’ll just disappear back into my corner of cyberspace.
I’m off to play with the other stuff in this release. Thanks Steve.
1 EDIT: confirmed, I am a tube. I’d missed the regex in
lists(). Works fine once that one’s modified as well.
Last edited by Bloke (2012-05-02 14:11:50)
Thanks for trying this out.
Regarding the addition of the type attribute for ordered lists: this is, actually, already in the issues list and tagged as a feature request. It’s on my radar but I don’t plan on addressing it as part of the 2.4 release.
already in the issues list
I scanned the issues list before writing the above, but somehow missed that one, sorry. I can see by reading the thread that the solution is more complicated than I originally envisaged anyway so I shall indeed slink off into the middle distance.
Last edited by Bloke (2012-05-02 13:57:33)
Works great overall.
Nitpick tough: your example above for Redcloth-style
DL has a typo… there should be a space between the hyphen (
-) and the definition term (example didn’t work at first).
- coffee := Hot _and_ black