Fixing rendering issue with markdown text in certain situations