Backport of fix for unknown markup parser

Original commit: #e28961f326096ce288f69d6772fb70334c506000