How do I set an HTML class attribute in Markdown?

You can embed HTML in Markdown. Type literally what you want, with no indent. <code class=”prettyprint”> code_line(1); // a code comment class More Code { } </code> For the specific case of syntax highlighting following the back ticks at the start of a fenced code block with the language works just about everywhere these days. … Read more

Have two columns in Markdown

While this doesn’t work for all dialects of Markdown, I got this to work with GitLab, GitHub, and mdBook. Basically, you create the table via HTML. Markdown and HTML don’t mix well, but if you surround the Markdown with whitespace, sometimes the Markdown can be recognized. https://docs.gitlab.com/ee/user/markdown.html#inline-html <table> <tr> <th> Good </th> <th> Bad </th> … Read more

Enabling markdown highlighting in Vim

About the native syntax highlight for markdown I think it only works for files with the extension .markdown by default. I was having problems with markdown syntax highlight for my .md files. I tried: :set syntax=markdown And it worked. So i included the following line in my .vimrc: au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown Now my … Read more