Looking for a javascript markdown library which can parse code blocks within ``` and ``` [closed]

StackOverflow https://stackoverflow.com/questions/10991049

  •  13-06-2021
  •  | 
  •  

Question

The default markdown syntax for code blocks is "indented by 4 spaces on each line".

But this is not very convenient for long code, instead, using:

```
code block
```

will be much better.

I'm looking for a javascript markdown library has this feature, could you recommend any?

PS: I want a browser-side one.

Was it helpful?

Solution

https://github.com/chjj/marked

They're referred to as "fences" and are a feature of github flavored markdown.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top