Genericized parse_cyth_markup, making it easier to extend.