#70 ✓invalid
Fritz Heinrichmeyer

redcloth 4.0.4 broke superscript and subscript

Reported by Fritz Heinrichmeyer | October 10th, 2008 @ 06:18 AM

Redcloth 4.0.3 works, 4.0.4 does not. (Working, as compiled with 4.0.3) Example:

http://www.fernuni-hagen.de/LGES...

Example Sourcecode:

In der Gleichung 1.12 DSV Teil 1 muss e^-jωTn^ stehen

Comments and changes to this ticket

  • Fritz Heinrichmeyer

    Fritz Heinrichmeyer October 10th, 2008 @ 07:56 AM

    ok, it works if i surround expressions with squared brackets

  • Mezza

    Mezza October 10th, 2008 @ 09:05 AM

    Doesn't work for me:

    input =<<-END Spawning stock biomass is currently estimated to be near historic lows, although total biomass is high. However, SSB~[2008]~ levels (1.1 million mt) relates to a relative depletion of about 38%, only slightly below the management target of B~[40%]~.\n END

    RedCloth.new(input).to_html =>

    Spawning stock biomass is currently estimated to be near historic lows, although total biomass is high. However, SSB~2008~ levels (1.1 million mt) relates to a relative depletion of about 38%, only slightly below the management target of B~[40%]~.

  • Jason Garber

    Jason Garber October 10th, 2008 @ 09:49 AM

    Yes, you must surround subscripts and superscripts with square brackets if they are not surrounding a phrase but instead part of a word. This changed in 4.0.4 because perfectly valid things, like tildes in URLs, were being recognized as subscripts, and because Textile 2, which is the standard RedCloth tries to emulate, behaves this way.

    The proper way to do square brackets is to put them around whatever you're trying to indicate, whether it's subscript, bold, a link--whatever. Mezza, you've got them inside the tildes and they should be outside.

  • Jason Garber
  • Jason Garber

    Jason Garber October 10th, 2008 @ 09:51 AM

    • State changed from “new” to “invalid”
  • Mezza

    Mezza October 10th, 2008 @ 10:11 AM

    Ah, ok then. Thanks greatly.

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

Pages