
emphasis not applied to _snake_case_
Reported by Dylan Clendenin (deepthawtz) | February 26th, 2009 @ 06:51 PM | in 4.2.0
Don't know if this is a bug but there is an inconsistency between redcloth and the way textile is rendered on http://textile.thresholdstate.com/.
**_trythis_** it will keep the empahsis. **_and_this_too_** it should keep the emphasis but does not with redcloth.
I can't really find a textile markup specification anywhere that touches this case so I mention the inconsistency between two implementations. Personally I would love it if redcloth could do this.
RedCloth.new("**_snake_case_**").to_html
works as expected.
/usr/bin/redcloth
does not emphasize the text.
Ignore the comments below. I couldn't find out how to delete them.
Comments and changes to this ticket
-
Dylan Clendenin (deepthawtz) February 26th, 2009 @ 08:08 PM
Interesting:
RedCloth.new("**_snake_case_**").to_html works properly.
-
Dylan Clendenin (deepthawtz) February 26th, 2009 @ 08:11 PM
The command-line redcloth does not get the same result.
redcloth --version
= RedCloth 4.1.9 -
Jason Garber February 27th, 2009 @ 09:21 AM
- State changed from new to open
If you're getting a different result between the redcloth executable and irb, I suspect they're accessing different versions.
Try these in IRB and tell me what you get:
>> RedCloth.new("**_snake_case_**").to_html => "<p><b>_snake_case_</b></p>" >> RedCloth.new("RedCloth::VERSION").to_html => "<p>4.1.9</p>" >> RedCloth::VERSION => 4.1.9
-
Dylan Clendenin (deepthawtz) February 27th, 2009 @ 09:37 AM
>> RedCloth.new("**_snake_case_**").to_html => "<p><b>_snake_case_</b></p>" >> RedCloth.new("RedCloth::VERSION").to_html => "<p>4.1.9</p>" >> RedCloth::VERSION => 4.1.9
-
Jason Garber February 27th, 2009 @ 10:09 AM
Okay, so it appears that
**_snake_case_**
doesn't work properly in either IRB or the redcloth executable. That wasn't what I understood from what you said before.It's definitely a bug and I'll work on fixing it. Thanks!
-
Dylan Clendenin (deepthawtz) February 27th, 2009 @ 02:05 PM
So, I can clarify the earlier confusion: it was working inside Textmate and not in IRB or from /usr/bin/redcloth.
Textmate was still
require
ing VERSION 3.0.4. Thus it was working in my editor (3.0.4) and not from the executable (4.1.9).Nevertheless this is a bug introduced in a >= 3.0.4 release we can safely assume now.
-
Jason Garber March 2nd, 2009 @ 10:23 AM
- Milestone cleared.
-
Jason Garber March 3rd, 2009 @ 01:46 PM
Gah! I'm having trouble fixing this. Things I think should work don't. I'll give it another go later on. Right now I've spent too many hours trying.
-
Dylan Clendenin (deepthawtz) March 3rd, 2009 @ 03:15 PM
Let me know if you need a second pair of eyes. I'd be glad to help too. We know that it worked at one point.
-
Jason Garber March 17th, 2009 @ 04:46 AM
- Milestone set to 4.2.0
- Tag changed from parser to explicit_square_brackets, parser
-
Tyson Whitehead May 6th, 2009 @ 10:46 AM
Here's some patches to fix this. Running against the test suite will show that 13 failures. Two of these are items the previous version did wrong (i.e., now
**
becomes and the inAmanitas
is not paired with the opening one). The remainder are due to it now consistently removing one level of space around-
and--
.This later action is an outcome of the rewrite of the
-
and--
handlers. While the old could be obtained with a bit more work, I'm not sure this is actually desirable. The new behaviour is consistent between en and em dashes, it is closer to what textile.com gives, it is what my editor claims is correct, and makes it possible to not get en dash space (e.g.,1993 - 94
). -
Tyson Whitehead May 6th, 2009 @ 10:49 AM
Okay, that totally screwed up my formatting in the previous post (a preview button would be nice). Anyway, here's the second patch.
-
Tyson Whitehead May 6th, 2009 @ 10:49 AM
Here is the third patch (being able to attach multiple files would also be nice).
-
Jason Garber May 29th, 2009 @ 11:07 PM
- State changed from open to resolved
(from [634a79df0dfb8172a993c120d5dfaeaf30624653]) Allow emphasized phrases to include underscores. [#110 state:resolved] http://github.com/jgarber/redcloth/commit/634a79df0dfb8172a993c120d...
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.
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
People watching this ticket
Attachments
Referenced by
-
110 emphasis not applied to _snake_case_ (from [634a79df0dfb8172a993c120d5dfaeaf30624653]) Allow e...