cryogen-project / cryogen-project/cryogen-flexmark

Regression: HTML comments get escaped

Open
#5 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
2
Forks
5
PR merge metrics
No merged PRs in 30d

Description

**Symptom:**

1. Turn on Cryogen "previews" in a new installation (`:previews? true`)
2. Add `` after one paragraph in one post
3. `` is escaped and rendered to the user. Furthermore, it does not restrict snippet length.

**Reason:**

Snippet trimming function expects `` to be parsed as an HTML comment. (See `more-marker?`) However, this is what it gets: `{:tag :p, :attrs nil, :content ()}`

**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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.