[markdown mode] Fix handling of escaped characters

Issue #2792
[markdown mode] Make test pass