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

The following Markdown from this question renders differently in different places:

**Edit:** **It seems there are differences between the two, and the + notation has restrictions that the ANSI join syntax does not have. Oracle themselves recommend that you not use the + notation. 
Full description here in the <a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/queries006.htm">Oracle® Database SQL Language Reference
11g Release 1 (11.1)</a>:**

Edit: *It seems there are differences between the two, and the + notation has restrictions that the ANSI join syntax does not have. Oracle themselves recommend that you not use the + notation. Full description here in the Oracle® Database SQL Language Reference 11g Release 1 (11.1):*

In the answer on the question page, the whole line is bold, from the second **. When editing the answer or viewing that specific revision of the answer, most of the line is in italics, and the outer pair of * are rendered as text.

The rendering of the question in all three places should be consistent with each other.

share|improve this question
1  
Yup, that's strange. Adding whitespace (e.g. a second space or a line feed) between **Edit:** and **It fixes the problem in the edit preview. Regex side-effect, maybe? –  Frédéric Hamidi Jun 5 '13 at 21:30
add comment

1 Answer

up vote 5 down vote accepted

Look at the timestamp on that answer:

edited Jul 28 '09 at 12:45

The HTML that is displayed on a question page is only rendered once, at submission, and not everytime it's viewed. So the answer you see is what the Markdown engine created almost four years ago. Lots of changes have been made to both Markdown engines since then.

When you click "edit", you see what today's the JavaScript Markdown version makes of the text, and when you visit the revision, you see what today's server-side version does (the revision views are rendered on demand, unlike the Q&A view).

If the answer were submitted as-is today (or if you made a no-op edit right now to force re-rendering) the answer would thus look exactly as the preview.

The lack of bolding in fact has nothing to do with the line breaks; rather, the reason is that the regular expressions don't use zero-width assertions to prevent intra-word emphasis, so as Frédéric Hamidi noted there need to be two characters between the two sections, because the surrounding characters are consumed.

At least for one of the two surrounding characters this may be fixable (JavaScript regular expressions don't have lookbehinds, but the character following the bolded text doesn't need to be consumed), and that should be sufficient. I'll look at that when I have time, but these things tend to have unexpected edge cases, so it needs some thorough testing (as much as I love breaking the Markdown toolchain).

But the most important thing is that – at least in 2013 –, the preview and the final version are consistent in that regard. It's entirely possible that it was consistent in 2009 as well (just with a different outcome), but it's also possible that the two versions differed back then.

share|improve this answer
add comment

You must log in to answer this question.

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