Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Plugins by

How can I specify the language for a code block in markdown-editor?

Fenced code blocks like this:


should be rendered as

<pre><code class="bash">



but are instead rendered as an inline code segment in a paragraph:






Q2A version: 1.8.4

1 Answer

0 votes

Apparently lack of support for syntax coloring hints is related to an old (yet still unresolved) issue. *sigh*

Maybe you can have a look at HtmlLawed.php to see if anything prevents this.
ago by
You mean `htmLawed.php`? Thanks for the suggestion, but I just took a look, and I clearly don't know enough PHP to understand what that code is doing.
ago by
To tell the truth, I don't understand all those things either. But you can search for "code" in that file.

Maybe, one of them will remove the style of <code> tags.

You can use "trial and error" technique.
ago by
There seems to be a misunderstanding. I don't want to remove the style from <code> tags. I want to be able to specify the (language-)style to be used in them in the post.