We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Convert markdown to plaintext using:
private fun convertMarkdownToPlaintext(markdown: String): String { val parser = Parser.builder().build() val document = parser.parse(markdown) val renderer = TextContentRenderer.builder().build() return renderer.render(document) }
Example:
this is **note**
Expected plaintext:
this is note
Actual plaintext:
(Also see what the reference implementation does: https://spec.commonmark.org/dingus/)
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
The plain text renderer is not really well-defined. But this is something we might change (CC @JinneeJ). Out of interest, what are you using it for?
I use this to convert markdown from a rich text editor on Android.
Ah this came up in #264 as well. Happy to accept a patch for this as an option on TextContentRenderer.Builder.
TextContentRenderer.Builder
Closing as a duplicate of #264
No branches or pull requests
Convert markdown to plaintext using:
Example:
Expected plaintext:
Actual plaintext:
(Also see what the reference implementation does: https://spec.commonmark.org/dingus/)
The text was updated successfully, but these errors were encountered: