Parsing the Markdown
This document details how Wysimark guarantees adherence to the Markdown specification and how it affects apps with existing Markdown
Last updated
Was this helpful?
This document details how Wysimark guarantees adherence to the Markdown specification and how it affects apps with existing Markdown
Last updated
Was this helpful?
Wysimark adheres to the specification.
It can be parsed and displayed by all popular Markdown libraries including marked, markdown-it, remarkable and remark.
GFM is extremely popular because it includes tables, task lists and strikethroughs which themselves are highly desired features.
Wysimark guarantees that any document generated by the Wysimark editor will return a round-trippable valid GFM Markdown document that adheres to the GitHub Flavored Markdown Specification.
By round-trippable, we mean that when you save the document then read it again, it comes back looking the same and retains 100% of its content and formatting. If the document is loaded into Wysimark and saved again, it generates exactly the same markdown text. That is, it can survive a round-trip to the server.
All documents created by Wysimark are guaranteed to follow the GFM specification which means any markdown parser that supports GFM can parse the document and display it correctly.
If you have existing Markdown documents in your app, Wysimark interprets those documents using the markdown specification and adheres as closely to the Markdown specification as possible while preventing code injection attacks and preventing badly formatted documents.
Markdown allows HTML code into a document; however, few parsers allow HTML code by default because it is a huge security risk. In order to not destroy content, we convert any embedded HTML into inline code and code blocks instead.
This should not affect you were allowing and depending on unsafe code being present in Markdown.
Convert Inline Images to Block Images
Markdown allows multiple images to be displayed in a single line and even allows images to be displayed inline next to text.
st people, you do not need to think or care about the edge cases
Every Markdown parser and editor must make certain decisions for security and user experience reasons. Wysimark has taken a long hard look at the edges of the Markdown specification to make sure you get an editor with the best trade offs. This will also save you time from having to make these hard decisions