How do I add Markdown formatting in a code / pre block?

后端 未结 2 1758
执念已碎
执念已碎 2021-02-18 15:10

This may seem to defeat the purpose of a code block, but I\'d like to be able to bold something within a code block. For example, if I wanted to bold the return line:

         


        
2条回答
  •  悲&欢浪女
    2021-02-18 15:26

    This syntax should solve your problem :

        ```
        int main(void) {
           **return 0;**
        }
        ```
    

    Just type three backticks in the beginning of the code block and it's should work.

提交回复
热议问题