Description
Symptom:
- Turn on Cryogen "previews" in a new installation (
:previews? true
) - Add
<!–- more -–>
after one paragraph in one post <!–- more -–>
is escaped and rendered to the user. Furthermore, it does not restrict snippet length.
Reason:
Snippet trimming function expects <!-- more -->
to be parsed as an HTML comment. (See more-marker?
) However, this is what it gets: {:tag :p, :attrs nil, :content (<!–-more-–>)}
Tried:
I printed the document at various stages of rendering, and found that the comment comes out already escaped from render-fn
(as defined in cryogen-flexmark
plugin).
Flexmark does have a couple different flags related to comments and escaping, which I tried setting to false (even though they should be false by default). This didn't help. There don't seem to be any open issues for HTML comments in the flexmark project.
Next:
Be good if someone else read the flexmark documentation again, I might have missed the relevant flag combination.
You could also look at the Document
object that comes out of Parser.parse
and see if it parsed the comment correctly. This would narrow down the flag search to either parsing or rendering. Unfortunately I don't have the environment set up for this at the moment.
Activity