-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Preserve (specific) HTML comments #177
Comments
@Rarst Does it make sense giving developers the choice to tell the library which comments to preserve? Perhaps through configuration. Something like:
Just suggesting that because I don't think hardcoding the values is a good idea. Every new comment with a special meaning would lead to a code change. I know Wordpress uses the Any thoughts? |
I think the meaningful configuration options might be something like:
Being able to preserve all matters because strict matches might be insufficient if comments contain something variable (yeah, that happens too). |
Implemented in #179. Thanks for the proposal! |
Released as 4.9.0. |
The converter currently discards all of HTML comments, but some of them might have special meaning and need to be preserved.
For example some systems use
<!--more-->
to separate excerpt from the rest of the content.I've tried overriding
CommentConverter
and it mostly works, but I get erroneous slash prepended somewhere (e.g. resulting output is\<!--more-->
)...The text was updated successfully, but these errors were encountered: