I assume the definition of a strikethrough fragment is that it starts and ends with a dash.
e.g. this is struck through
But this is also handled the same way by the parser and does not have the terminating dash.
I think this is a parser bug.
How does one use a dash in the text as just a dash? Let's see if backslash dash works:
\-This should not be struck through.- Notice that the trailing dash is NOT displayed.
I think this is a parser bug.
Can the others be escaped?
Should not be bold. (leading asterisk but no trailing)
\*Should not be bold.* (escaped leading asterisk plus a trailing one)
Should not be underlined. (leading underscore but no trailing)
\_Should not be underlined._ (escaped leading underscore plus a trailing one)
Definitely some inconsistency here.
I'm writing some documentation for my own purposes and will give it to you when I'm done.
Well, the parsing of the formatting symbols is only from left to right, i.e. the missing closing symbol can't cancel the open symbol action. The rules are following:
The formatting starts with not escaped formatting symbol (\/ \* \_ \` \-) preceded by a white-space character.
The formatting ends by either the same symbol, followed by a white-space, or by the end of the paragraph.
The new lines symbols are white-space characters in this context.
The only formatting that behaves different is bold (*) which does not end at the end of the paragraph and expect explicit closing symbol. In your example, the open asterisk is in the first paragraph, and the closing in the next (not counting the escaped one).
This behavior is wrong and should be fixed of course.
But there is another problem. Recently I am working on a second markup parser for the posts, compatible with BBCode. But because I want to make both parsers available simultaneously, I have to rework the current parser in order to make it faster and interface compatible with the BBCode parser. Because of this work, the fixes will be delayed a little.