I want to represent my directory & file structure in Markdown syntax with fenced code blocks like this:
📁project
├── 📁client
└── 📁server
The thing is that my Markdown linter and other Markdown Style Guides recommend to Always specify the language of the code
when using Fenced Code Blocks like this:
```language
a = 1
I was wondering if I should leave it without specifying a language, add a random one, or if there is a specific one for this situation that would highlight the structure.
Fenced Code Blocks are defined using the syntax originally established in PHP Markdown Extra and popularized by GitHub Flavored Markdown. Fenced code blocks begin with three or more backticks ( ``` ) or tildes ( ~~~ ) on a line by themselves and end with a matching set of backticks or tildes on a line by themselves.
There are two ways to format code in Markdown. You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to.
To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input: This is a normal paragraph: This is a code block. A code block continues until it reaches a line that is not indented (or the end of the article).
There's text
for non-highlighted fenced blocks compliant with MD040. I'm not sure how much official in Markdown world that is but it is listed in Github's linguist languages.yml
as supported highlighted (in fact non-highlighted) language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With