Skip to content

Can I disable code blocks entirely? #2578

Answered by UziTech
PEZ asked this question in Q&A
Sep 12, 2022 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

The CommonMark spec states that headings only work up to 3 spaces. So even if you turn off code blocks the other blocks may not work as expected. I think there are two ways for you to do this:

  1. Remove spaces before sending the string to marked than add spaces back if neccessary.
  2. Create your own tokenizer that doesn't follow CommonMark spec.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@PEZ
Comment options

@PEZ
Comment options

@PEZ
Comment options

@PEZ
Comment options

Answer selected by PEZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants