Tags
To create this post I clicked Add New from the All Posts page in the site dashboard. The classic editor opened, in the Text tab. This post is written and posted from the classic editor’s Text tab.
Test inline formats
Emphasis Normal Stronger normal /slanted/ normal code
Punish code punctuation
Display a code fragment made up of punctuation from seven-bit ASCII. The characters are in order of the keys on the top row of a typical US layout QWERTY keyboard, shifted then unshifted.
The code reads: tilde backtick, bang one, at two, hash three, dollar four, percent five, caret six, ampersand seven, start eight, left paren nine, right paren ten, underscore minus, plus equals, left brace left bracket, right brace right bracket, vertical bar backslash colon semicolon, double quote single quote, less than comma, greater than dot, question mark slash.
Inline display with backticks
In this case, the backtick is omitted from the big list to avoid obvious trouble.
Backticked code: ~ !1 @2 #3 $4 %5 ^6 &7 *8 (9 )0 _- += {[ }] |\ :; "' . ?/
Block display with Markdown Extra three backtick fences
~` !1 @2 #3 $4 %5 ^6 &7 *8 (9 )0 _- += {[ }] |\ :; "' . ?/
Block display with Markdown Extra three tilde fences
~` !1 @2 #3 $4 %5 ^6 &7 *8 (9 )0 _- += {[ }] |\ :; "' . ?/
Block display with four-space indent
~` !1 @2 #3 $4 %5 ^6 &7 *8 (9 )0 _- += {[ }] |\ :; "' . ?/
Conclusions from the Preview
- Markdown on WP is broken for code fragment displays. Part of the problem might be the editor, which in other posts I observed changing greater then signs into
>
on its own while I was editing the text. In these examples, it seems to have swallowed them whole, but that might be because they were balanced by less than signs and so it thought it was swallowing an invalid HTML tag whole. -
On a positive note, both fenced code blocks made the same mistake. But they made different mistakes than the indented code block.
-
The change of ampersand seven into
&7
in backticks and four space indent is just plain wrong. Understandable, but still wrong. Something didn’t trust the Markdown processor to do the right thing, and pre-processed the text before letting Markdown touch it.
My bottom line takeaway from this is that Markdown on WordPress is a nice idea, but not implemented well. Refer to Stack Overflow for an example of a site with Markdown well integrated and very well implemented. As a user Coming from years of experience writing in Markdown on Stack Overflow, this is jarring and adds friction to my work.