-
Notifications
You must be signed in to change notification settings - Fork 173
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
Stripping markdown #300
Comments
Your best bet would be a custom renderer based on https://github.com/gomarkdown/markdown/blob/master/md/md_renderer.go Notice md_renderer.go has a few ast nodes not implemented so you would have to implement those as well. Or at least remove the panic(). Since this is a question and not a bug report, I'm going to close it. |
How about option I'm checking briefly what it does and it seems to strip html tags? I'm not very proficient with GO yet so I might be misunderstanding |
Well, it does what you say and what the comments say. I haven't looked at this code in very long time so after 5 minutes of reading you'll know more than I do at this point. |
👋 I've opened a PR related to this discussion #301 |
Like I commented, that change isn't right. You can of course fork the library and use it as a simple hack to get what you want. Just be aware that it won't work well for tables, it'll probably html-escape code blocks (i.e. '>' will turn into '>` etc. |
Sure, thanks for your time and explaining things to me. I will most likely work on a custom renderrer then 👍 |
Hi, is it possible to remove markdown from a text and output plain text without any markdown with this library? Do I have to implement custom renderer for this purpose or there's some other way to achieve this?
Example input:
output:
The text was updated successfully, but these errors were encountered: