Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-10 11:39:05

MyOwn31
New Member
From: Russia
Registered: 2008-10-15
Posts: 9

[textile] A trouble with quotes parsing

During my attempt to adopt Textile’s quote parsing (I changed quote symbols from English typographic ones to those in Russian typography), I noticed a strange bug in quotes parsing.

It was noticed in an article that is quite large (about 3000 symbols not counting the Textile formatting).
In the beginning of the article, quotes are parsed correctly.

«go dance and „yay“»

The result is:

«go dance and „yay“»

But in the lowest part of an article, I noticed that the double quotes were escaped in a wrong manner.

»„test“ row»

The result is:

»„test“ row»

The changes applied to the classTextile.php are the following:

Find row 191

Change:

@define('txt_quote_single_open',  '‘');
@define('txt_quote_single_close', '’');
@define('txt_quote_double_open',  '“');
@define('txt_quote_double_close', '”');

To:

@define('txt_quote_single_open',  '„');
@define('txt_quote_single_close', '“');
@define('txt_quote_double_open',  '«');
@define('txt_quote_double_close', '»');

I left the “modified” version of formatting because it was easier to notice the error. “bc.” Textag is a cheater.)

Offline

#2 2009-05-10 11:40:12

MyOwn31
New Member
From: Russia
Registered: 2008-10-15
Posts: 9

Re: [textile] A trouble with quotes parsing

In other words, double quotes in the end of the article were placed like “close-close”, not “open-close” like usually.

Last edited by MyOwn31 (2009-05-10 11:41:28)

Offline

Board footer

Powered by FluxBB