What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

Examples:

  1. http://en.wikipedia.org/wiki/Two's_complement
  2. two's complement
  3. two's complement

The original Markdown was:

1. http://en.wikipedia.org/wiki/Two's_complement
2. [two's complement][1]
3. [two's complement](http://en.wikipedia.org/wiki/Two's_complement)

[1]: http://en.wikipedia.org/wiki/Two's_complement

Shows in preview (when editing) as:

  1. http://en.wikipedia.org/wiki/Two's_complement
  2. two's complement
  3. two's complement
share|improve this question
    
What about those of us with less than the required rep to edit? –  The Unhandled Exception May 6 '10 at 22:15
    
@Josh: You can build the “revisions” URL yourself (and use “view source”) even for single revision questions/answers: http://[sofu].com/posts/[num]/revisions meta.stackexchange.com/questions/41391/… –  Chris Johnsen May 12 '10 at 4:05
    
@Chris: This question is about how it looks in the preview window when editing, not the markdown source. –  Gnome May 12 '10 at 4:57
1  
@Josh: You can type the markdown into either a new question ('ask question' button at the top) or an answer (below) to see how the preview behaves. (As far as I know, both kinds of previews should be identical.) –  Gnome May 12 '10 at 4:58
1  
@The Cat: The question at the time of Josh's comment did not include the code block that showed the markup (see the timeline). Also, since it only had one revision, it did not include the “edited … ago” link to the ‘revisions’ page. My comment tells how a non-editor can arrange to see the markup for a single revision post (manually construct the URL to the ‘revisions’ page; then use the “view source” link). –  Chris Johnsen May 12 '10 at 6:32

2 Answers 2

up vote 4 down vote accepted

Workaround is using %27 instead of '

1. http://en.wikipedia.org/wiki/Two%27s_complement
2. [two's complement][1]
3. [two's complement](http://en.wikipedia.org/wiki/Two%27s_complement)

[1]: http://en.wikipedia.org/wiki/Two%27s_complement

will be

  1. http://en.wikipedia.org/wiki/Two%27s_complement
  2. two's complement
  3. two's complement
share|improve this answer
    
Actually, just using [ text ]( href ) works just fine when posted, just not in the preview. –  Gnome May 12 '10 at 4:55
1  
That's not even a workaround, but the required way reserved characters should be encoded. Nice if some editors or browsers make it easy for you, but I think it's still a reserved character... –  Arjan May 12 '10 at 5:39
    
@The Cat: yes, I know that it works once it is posted. But this bug report is specifically about the preview window. @S.Mark thanks for the suggestion, but it seems rather complicated to me. I wonder why the markdown can not just be parsed in the same way as it is later parsed (when posted). –  tanascius May 12 '10 at 15:47

And a quick fix could be, changing following 3 regexes from

/^(<a\shref="(\#\d+|(https?|ftp):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)]+)"(\stitle="[^"<>]+")?\s?>|<\/a>)$/i

/(^|\s)(https?|ftp)(:\/\/[-A-Z0-9+&@#\/%?=~_|\[\]\(\)!:,\.;]*[-A-Z0-9+&@#\/%=~_|\[\]])($|\W)/gi

/<((https?|ftp):[^'">\s]+)>/gi

to

/^(<a\shref="(\#\d+|(https?|ftp):\/\/[-A-Za-z0-9+&@#\/%?=~_|!:,.;\(\)']+)"(\stitle="[^"<>]+")?\s?>|<\/a>)$/i

/(^|\s)(https?|ftp)(:\/\/[-A-Z0-9+&@#\/%?=~_|\[\]\(\)!:,\.;']*[-A-Z0-9+&@#\/%=~_|\[\]])($|\W)/gi

/<((https?|ftp):[^">\s]+)>/gi

in wmd.js

Note: I am not sure those could cause different flaws though :)

share|improve this answer

You must log in to answer this question.

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