15

In this question: Helper: loose vs. lose I added a comment with the following markup:

clarification: by “should be pronounced *loss*” do you mean 
“should rhyme with *dose*” or “should rhyme with *boss*”? 
Wouldn’t a purely rule-based phonetic expectation for a word 
spelled *lose* to rhyme with *dose*?

I expected it to look something like this:

clarification: by “should be pronounced loss” do you mean “should rhyme with dose” or “should rhyme with boss”? Wouldn’t a purely rule-based phonetic expectation for a word spelled lose to rhyme with dose?

Unfortunately it comes out looking like this:

clarification: by “should be pronounced loss*” do you mean “should rhyme with *dose*” or “should rhyme with *boss*”? Wouldn’t a purely rule-based phonetic expectation for a word spelled *lose to rhyme with dose?

Which is just awesomely terrible, embarrassingly bad. It makes me, as the commenter, look foolish. Seeing as how using HTML as a workaround is not possible in comments, is there any workaround so that my comments can be formatted correctly? Or is it really a “design choice” that you can only italicize some parts of comments but not others?


Update: I get the same issue if I used the “official” underscore syntax for italics in comment markup:

 clarification: by “should be pronounced _loss_” do you mean 
 “should rhyme with _dose_” or “should rhyme with _boss_”? 
 Wouldn’t a purely rule-based phonetic expectation for a word 
 spelled _lose_ to rhyme with _dose_?

resulting in this:

clarification: by “should be pronounced loss_” do you mean “should rhyme with _dose_” or “should rhyme with _boss_”? Wouldn’t a purely rule-based phonetic expectation for a word spelled _lose to rhyme with dose?

  • testing: by “should be pronounced loss” do you mean “should rhyme with dose” or “should rhyme with boss”? Wouldn't a purely rule-based phonetic expectation for a word spelled lose to rhyme with dose? – MrHen Jun 14 '11 at 20:37
  • Yeah, that is pretty bad. Whatever the regex is scanning for, something went wrong. – MrHen Jun 14 '11 at 20:37
  • clarification: by "should be pronounced loss" do you mean "should rhyme with dose" or "should rhyme with boss"? Wouldn't a purely rule-based phonetic expectation for a word spelled lose to rhyme with dose? – Jeff Atwood Jun 14 '11 at 20:46
  • 1
    I've also encountered this bug when trying to make something both bold and italic at the same time, like this: "both" ...or this: "both" – Randolf Richardson Jun 15 '11 at 3:31
  • From memory, the same problem occurs in chat. – Grant Thomas Jun 16 '11 at 10:29
  • I see @Oded added the tag status-bydesign on 22 July, indicating that this is how the comment Markdown is designed to work. That seems utterly ludicrous to me. I run afoul of this arbitrary and extremely annoying bug in nearly half the comments I make. Why on earth would anyone expect the Markdown to choke on typographically correct quotes, but do fine with incorrect quotes? – Janus Bahs Jacquet Aug 25 '13 at 18:21
3

You need to get away from "fancy quotes" there, because:

clarification: by "should be pronounced loss" do you mean "should rhyme with dose" or "should rhyme with boss"? Wouldn't a purely rule-based phonetic expectation for a word spelled lose to rhyme with dose?

Works just fine.

  • 4
    Blech, straight quotes. Those are for programming, not English text. Almost as hideous as the incorrect parsing with proper quotes. – nohat Jun 14 '11 at 20:50
  • Interesting. Out of curiosity, how are the fancy quotes an impacting factor? – MrHen Jun 14 '11 at 22:56
  • 2
    Fancy quotes? Please clarify. – Randolf Richardson Jun 15 '11 at 3:33
  • 1
    @Randolf, fancy quotes = curly quotes = “ ” instead of ". (On Windows “ = Alt+Num 0147, ” = Alt+Num 0148.) – Marthaª Jun 16 '11 at 14:16
  • I see what you mean now, thanks! (+1 for making that easy to understand.) – Randolf Richardson Jun 16 '11 at 16:43
  • 1
    Anything that is detecting quote-characters in some other way than via the Unicode Quotation_Mark=Yes property (typically abbreviated \p{qmark} in regexes) is simply doing it wrong. Read: it’s a bug. There are 29 such code points, including both straight and curly quotes. My hands are quite used to typing “Option-[” and “Shift-Option-[”, and ‘Option-]’ and ‘Shift-Option-]’; these is no reason for code to mess these up or to consider them second-class citizens. This is the 21ˢᵗ century: we should not be stuck with 19ᵗʰ century notions of typewriters. Wake up and smell the Uɴɪᴄᴏᴅᴇ. :) – tchrist Feb 17 '12 at 16:37
2

Based on my test comment above, it appears that the matching algorithm is greedily scanning for a closing match. Instead of finding the nearest Markdown close it is grabbing the furthest Markdown close.

  • 3
    apparently, it (1) ignores ANY special characters that are adjacent to “fancy” characters like open/close quotes and (2) it ignores potential closing special characters that appear after a space character. – nohat Jun 14 '11 at 23:00
  • _This is _a test. – MrHen Jun 14 '11 at 23:02
  • Well, whadda-ya know. – MrHen Jun 14 '11 at 23:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .