Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-30 15:28:40

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Tildes in different paragraphs getting parsed as 'sub' in Textpattern

I’ve got a couple file paths (relative to the users home directory, so containing tildes … ‘~’) in different paragraphs (the first starts in a blockquote) in Textpattern 4.0.3 that keep getting parsed as subscript. Unfortunately, it’s only reproducible in Textpattern, not in Textile.

You can see the results here (view the html and look for the opening and closing ‘sub’ tags to see where the tildes were (there’s only two of them).

Is there any temporary workaround for this? Any way I can escape the tildes? Do you need to the the original textile formatted text to see if I made a mistake?

Is this a known issue? Should I be reporting this as a bug in Textpattern?

Offline

#2 2006-03-30 16:57:37

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: Tildes in different paragraphs getting parsed as 'sub' in Textpattern

See the FAQ — the version of Textile on the Textism site is not the same as the version included with Textpattern.

I’d bet it’s a syntax error, though there have been some changes to Textile since the release of 4.0.3 (see this thread).

Code is always helpful in debugging – you can use pastebin to post code samples that would otherwise get parsed by the board.

you can also always tell textile not to parse a block with < notextile></notextitle>


And then my dog ate my badger, and the love was lost.

Offline

#3 2006-03-30 20:08:01

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Re: Tildes in different paragraphs getting parsed as 'sub' in Textpattern

Well, here’s the original text w/Textile markup: http://pastebin.com/631385.

In the meantime I’ve wrapped the paths in ‘notextile’ tags.

I’ll have to investigate upgrading the Textile implementation, I just don’t want to introduce further bugs.

Last edited by morgant (2006-03-30 20:08:34)

Offline

#4 2006-03-31 02:11:10

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: Tildes in different paragraphs getting parsed as 'sub' in Textpattern

Looking at that code snippet, I’ve narrowed the culprit down to the fact that the second tilde is surrounded by punctuation:

<notextile>~test
(~/</notextile>

will produce the same results, using the most current version of classTextile.php from SVN.

Regular expressions still haven’t clicked with me, so I won’t be much help to the dev team, but hopefully condensing it down will make it easier to track down (or someone more in the know can explain if this is expected behaviour).


And then my dog ate my badger, and the love was lost.

Offline

#5 2006-03-31 22:37:52

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Re: Tildes in different paragraphs getting parsed as 'sub' in Textpattern

Good catch. I have noticed that Textile doesn’t always play well with punctuation (but sometimes it plays very well, e.g. punctuation at the end of URLs).

Offline

#6 2006-04-10 21:11:24

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Re: Tildes in different paragraphs getting parsed as 'sub' in Textpattern

Just wanted to note that updating ‘classTextile.php’ did not solve this particular issue (although it did fix the well documented <notextile>%(class)span%</notextile> issues), even after re-saving the article. So, this is still in need of a fix.

I’ve put back my ‘notextile’ tags and doubt I’ll go back and change them again.

Offline

Board footer

Powered by FluxBB