#180 ✓invalid

Colon not acepted in 'class' attribute

Reported by mxunit | January 5th, 2010 @ 06:36 AM

When using the following syntax, HTML transformation fails:

.pre(brush: ruby) def some_code ...

Looks like maybe adding a colon to the regular expression on line #21 in ext/redcloth_scan/redcloth_common.rl
might work ... style_chars = [a-z0-9: ;-_#&.%:];


Comments and changes to this ticket

  • Jason Garber

    Jason Garber March 1st, 2010 @ 09:08 AM

    • State changed from “new” to “invalid”

    Style is supposed to be in curly braces, not parentheses. Parentheses are for class and ID, which do not allow colons.

  • mxunit

    mxunit March 1st, 2010 @ 11:05 AM

    • Title changed from “Colon not acepted in style attribute” to “Colon not acepted in 'class' attribute”

    John, You are absolutely correct. My bad. The title should be "Colon not accepted in 'class' attribute". Is it possible to re-open?

    The use case, btw, is using SyntaxHighlighter (http://alexgorbatchev.com/wiki/SyntaxHighlighter), whose HTML is usually

    ...some code...
    . It would be nice in RedCloth to do .pre(brush: ruby) def some_code ...


  • mxunit

    mxunit March 6th, 2010 @ 10:01 AM

    Correction that should be "Jason" not John ... apologies.

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