Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The ability to disable standard block/inline syntaxes #393

Closed
lotusprey opened this issue Mar 2, 2022 · 0 comments · Fixed by #404
Closed

The ability to disable standard block/inline syntaxes #393

lotusprey opened this issue Mar 2, 2022 · 0 comments · Fixed by #404
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@lotusprey
Copy link

lotusprey commented Mar 2, 2022

Problem

I need to parse markdown that doesn't comply with the popular specs. I can manage implementing custom syntaxes, but a roadblock I've hit is that the standard block/inline syntaxes, which are forcefully included, parse improperly some data (improperly, as to the custom spec that I have to follow).

Example

<center><a>**some text**</a></center> is parsed as **some text**, while I want some text. The block parser wraps it in a Text element, but UnparsedContent is what I need.

Possible Solution

Maybe the markdownToHtml function can have two optional parameters - withStandardBlockSyntaxes and withStandardInlineSyntaxes - that would be true by default. Disabling them will prevent the BlockParser and InlineParser from auto-including the standard syntaxes.


Another thing is that I don't need the functionality of all the standard syntaxes and excluding them may improve performance a little.

@srawlins srawlins added type-enhancement A request for a change that isn't a bug P3 A lower priority bug or feature request labels Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants