improved markdown syntax recognition