#239 new
Bernat Ràfales

Problem when using an underscore to emphasize and linking an url with an underscore

Reported by Bernat Ràfales | December 2nd, 2011 @ 10:15 AM

I've found the RedCloth 4.2.9 has a problem when rendering this text:

CAUTION: _Locale.current_ is not the same as _I18n.locale_. The first is about content, the latter about interface. Their value is independently set and can be different. See "Ubiquo Core guide":ubiquo_core.html#configuring-the-locales-of-your-ubiquo-project for information on how to configure the locales of your project.

I think the problem is because RedCloth tries to close the _ from _I18n.locale_ with the _ found in the URL link, making everything emphasized until 'core', thus showing a wrong link.

I don't know the internals of the gem but it seems like an issue regarding a greedy parser or something like that. The first _ in _I18n.locale_ should be matched with that last _ instead of the one on the url.


Comments and changes to this ticket

  • Jason Garber

    Jason Garber December 5th, 2011 @ 05:57 PM

    Yeah, these issues are tricky. I can't fix it in the current RedCloth but I'll keep the issue around and make sure it works in the new RedCloth, where the parser can be understood by mere mortals.

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