Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-17 21:08:49

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Help test new Textile changes

I’ve made a number of tentative Textile improvements in revs 1100-1107. Amongst the changes:

  • Better handling of span tags like *bold* around non-ASCII characters
  • Better ^sup^ handling
  • A fix for image alignment
  • Some link and image improvements
  • Smarter placement of <p> and <br> tags
  • [new] Fix mailto: links

Lots of testing is needed, if you happen to have a backup or local site on which to test. You can fetch the new version of classTextile.php and replace your existing 4.0.2 copy in textpattern/lib/. Things to test:

  • i18n support – see if the known bugs have been fixed, and no new ones introduced
  • existing articles – view some existing articles and re-save or use the preview and html tabs to see if the new version has introduced any adverse changes

Remember that Textile changes aren’t applied to an article until you re-save it.

If something goes wrong, revert to the 4.0.2 copy of Textile and re-save.

When reporting problems, please post the minimal input and a copy or link to the output – don’t assume we’ll be able to see the same results as you, since i18n effects in particular can be highly system dependent. Use pastebin or similar if you’re having trouble posting code on the forum.

Last edited by zem (2005-11-18 23:33:14)


Alex

Offline

#2 2005-11-17 22:00:07

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: Help test new Textile changes

zem, is it or will it be possible at all to assign a class to a link?

I tried <notextile>linktext; but that doesn’t work.

Last edited by andreas (2005-11-17 22:00:39)

Offline

#3 2005-11-17 22:24:25

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Help test new Textile changes

You tell me. Which version? Did it work before?


Alex

Offline

#4 2005-11-20 08:25:54

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,245
Website

Re: Help test new Textile changes

Zem, I don’t know what you expect to happen with Japanese text with this latest rev.

It still fails to process inline tags for this language.

this textfile has both the input and the resulting html (file is utf-8). The second paragraph has one bolded string (fails, the * are displayed), one emphasised string of characters and one URI (part of the text is swallowed into the URL, some characters are destroyed). Depending on your text-editor, those characters will be shown as question marks, unknown unicode marks (a square with some symbol in), or something else…

(block level tags usually work well with Japanese, I think. I don’t use Textile that often).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#5 2005-11-20 14:59:21

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: Help test new Textile changes

You tell me. Which version? Did it work before?

Version 4.0.2

I don’t think it worked before but I haven’t tried for a long time. I requested it once during the Gamma phase simply making the analogy from the other Textile syntax elements.

So I suppose this is a feature request ;-)

Offline

#6 2005-11-20 21:28:06

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Help test new Textile changes

phiw,

Thanks for the example, that’s exactly the kind of thing I need.

Regarding the strong and em tags in the second line: Textile deliberately ignores character span tags that are bounded on both sides by word characters, because something like vis-a-vis shouldn’t become vis<del>a</del>vis. So I wouldn’t expect those two fragments to work in any language. If it worked that way before, it was a bug. (Is there something unique about Japanese that would make that useful? Not that I think Textile should have language specific exceptions, I’m just curious).

The link thing is definitely a bug, looking into it.


Alex

Offline

#7 2005-11-20 21:59:20

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Help test new Textile changes

The link thing is definitely a bug, looking into it.

Looks like it’s dependent on the locale setting – with locale ‘C’ it works perfectly. What’s your locale set to? (It’s shown in admin > diagnostics)


Alex

Offline

#8 2005-11-21 00:03:06

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,245
Website

Re: Help test new Textile changes

> zem wrote:

Looks like it’s dependent on the locale setting – with locale ‘C’ it works perfectly. What’s your locale set to? (It’s shown in admin > diagnostics)

original test en-GB UTF-8
tested now with ja_JP.UTF-8 and I get the same problem

OS X 10.3, localhost, MySql 4.0.26-standard, PHP/4.3.11 – Gecko: Camino latest nightly, Safari 1.31.

And

Regarding the strong and em tags in the second line: Textile deliberately ignores character span tags that are bounded on both sides by word characters, because something like vis-a-vis shouldn’t become vis<del>a</del>vis. So I wouldn’t expect those two fragments to work in any language. If it worked that way before, it was a bug. (Is there something unique about Japanese that would make that useful? Not that I think Textile should have language specific exceptions, I’m just curious).

No it never worked, that is the first reason why we started using MarkDown to input Japanese text.

A typical Japanese sentence doesn’t contain any white space at all, it is a long string of characters; if any white space is used, it would be the Japanese white space, but that is exceptional. And that is where Textile fails. I don’t know which voodoo MarkDown performs — or rather Michel Fortin’s port, but strong, em and links work well, so far. (ok, for links I guess it is due to the syntax: [linktext](url "title")).

If you want some more text snippets, just ask. I can ask my partner to create some ‘acid’ tests :-)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#9 2005-11-21 01:50:37

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Help test new Textile changes

A typical Japanese sentence doesn’t contain any white space at all, it is a long string of characters; if any white space is used, it would be the Japanese white space, but that is exceptional. And that is where Textile fails. I don’t know which voodoo MarkDown performs — or rather Michel Fortin’s port, but strong, em and links work well, so far. (ok, for links I guess it is due to the syntax: [linktext](url “title”)).

Ah, fair enough. Textile 2 has a special syntax for such things: <notextile>fooboldbar, foolinkbar</notextile>, etc. That’s something I’ll look at later; for now I’m just trying to bring multibyte support up to par with other languages. (That is, most Textile markup needs to be surrounded with whitespace or punctuation)

If you want some more text snippets, just ask. I can ask my partner to create some ‘acid’ tests :-)

Short example snippets would be very helpful indeed – we’re pretty much left to guess otherwise. I’ve created a new thread for precisely that.


Alex

Offline

#10 2005-11-21 07:32:33

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Help test new Textile changes

BTW: rev 1116 should handle the link correctly (at least it does on my two test boxes). Let me know how it goes.


Alex

Offline

#11 2005-11-22 00:32:46

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,245
Website

Re: Help test new Textile changes

> zem wrote:

BTW: rev 1116 should handle the link correctly (at least it does on my two test boxes). Let me know how it goes.

Unexpected result :-)

Inputting the textile syntax for a clickable link result in [entity]textstring[entity]:url

See the sample file.

rev r1116, freshly set up from svn. Tested with locale set to en-GB and ja-JP.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#12 2005-11-23 22:39:40

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Help test new Textile changes

Unexpected result :-)

I get the expected result here.

I’d class this as an accident though – foo"bar":http://google.com/ works for me, but I wouldn’t consider that valid Textile syntax.

As I said before, I’ll look at adding the [] syntax later. Until then, consider surrounding whitespace or punctuation as necessary.


Alex

Offline

Board footer

Powered by FluxBB