gjtorikian / commonmarker

Ruby wrapper for the comrak (CommonMark parser) Rust crate
MIT License
416 stars 80 forks source link

Allow disabling 4-space code blocks #167

Closed marcoms closed 2 years ago

marcoms commented 2 years ago

In our Middleman site, we use CommonMarker with partials to allow reusing content, however we have to ensure that none of that content contains 4 spaces to avoid it becoming a code block, which is very tedious. It would be a big help to disable this feature, since we exclusively use code fences instead.

gjtorikian commented 2 years ago

If it's not in the official spec, we won't support it. Sorry. I would suggest that whatever is inserting the content into your layout (I'm assuming ERB or some such) should strip the whitespace; or use a plugin like https://github.com/gjtorikian/html-pipeline to handle these issues.