#141 ✓ resolved
Jason Garber

Image link not recognized with alt text

Reported by Jason Garber | April 8th, 2009 @ 12:01 PM | in 4.2.0

From redcloth-upwards:


RedCloth.new("!/image_r.jpg(description)!:image.jpg").to_html

<p><a href="image.jpg"><img src="/image_r.jpg" title="description" alt="description" /></a></p>

That is correct.

Then we just add an "a" (or anything else) to the end of the string:


RedCloth.new("!/image_r.jpg(description)!:image.jpg a").to_html

Incorrect result (link is missed):
<p><img src="/image_r.jpg" title="description" alt="description" /> a</p>

It only happens when "(description)" is present.

Comments and changes to this ticket

  • Rodrigo Rosenfeld Rosas

    Rodrigo Rosenfeld Rosas April 9th, 2009 @ 06:09 AM

    Just some more information stripped from the original e-mail:

    The bug is present in 4.1.9, but not in any previous version, including 4.1.1.

    The test cases don't contain the presented use case. Maybe it should be necessary to work in all test suite to work in a different approach. I found this bug because of a test case from my own in a Rails application I maintain. This happened when I upgraded RedCloth and some of my test cases didn't pass. Instead of just writing small pieces of text, it would be very interesting to have a whole text exploring all those minor tests and using assert_match to catch all snippets that the textilized text should contain.

  • Jason Garber

    Jason Garber June 10th, 2009 @ 01:54 PM

    • State changed from “new” to “resolved”

    I fixed this one in f89b9e2159a5952fcb1260faad87af18cf0f482d. The github API must be flaky today.

  • Rodrigo Rosenfeld Rosas

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

Tags

Pages