#253 new
Vsevolod Gromov

RedCloth3 (4, maybe, too) does not allow cyrillic acronyms

Reported by Vsevolod Gromov | October 28th, 2012 @ 01:39 PM

For instance:

СССР(Союз Советских Социалистических Республик)

will output text as-is, while:

SPI(Serial Programming Interface)

is working fine.
I've found, that acronym regex match expression could be re-written with unicode support as (line 459, redcloth3.rb):

/\b(\p{Lu}(?:\p{Lu}|[0-9])+)\b(?:[(]([^)]*)[)])/

instead of:

/\b([A-Z][A-Z0-9]{1,})\b(?:[(]([^)]*)[)])/

But, it's not working in RedCloth3 which is used in Redmine 2.1.2 installation I'm working with, application does not execute after change is applied. The regex implementation, used in redcloth3, may be unaware of \p escapes...

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RedCloth is a Ruby library for converting Textile into HTML

Shared Ticket Bins

People watching this ticket

Pages