jincheng9 / markdown_supported_languages

Markdown supported languages for syntax highlighting
195 stars 27 forks source link

Escape asterisks to prevent them from being interpreted #12

Open webbnh opened 3 months ago

webbnh commented 3 months ago

Markdown interprets paired asterisks in a line as marking italicized text. So, for the lines in Readme.md which cite more than one filename, we need to escape the asterisks; otherwise, they will be removed from the rendered text and the characters between them will be displayed in italics, which is not what we want.

This PR inserts a backslash before each asterisk which follows a single quote (i.e., the filename examples) to prevent the asterisk from being interpreted. I did a global replace, rather than treating just the lines with multiple filenames, because we should be escaping the asterisks wherever we want them treated literally.