[03] Code formatting + highlighting

[03] Formatting code

If you want to write a code block, you can write three backticks at the beginning and GitHub will try to guess what language you are writing in.

But if you ship a language like Vue, Typescript, JSX, you can write it explicitly to get the correct highlighting.


The first line of the image below uses ```jsx:


Fragment rendering:

(This can be extended to gist, by the way, if you define gist with .jsx extension, then you will get JSX highlighting)

List of supported languages ​​on Github 





**

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324971583&siteId=291194637