FIX: dialects accept nested inline markup
FIX: improve list bbcodes: ignore newlines resulting in unnecessary blank lines
FIX: auto-quote should not trigger when the first " is preceded by bbcode-like garbage.
FIX: rewrite replaceBlock logic to better handle mismatched nested quotes.
add comments and improve variable names
Merge pull request #2592 from Elberet/fix-parser

Fixes for quirky markdown parser behaviours