Skip to content
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

Throw the "Raw HTML omitted" warning whenever Goldmark replaces raw HTML #13013

Closed
jmooring opened this issue Nov 4, 2024 · 2 comments
Closed
Assignees
Milestone

Comments

@jmooring
Copy link
Member

jmooring commented Nov 4, 2024

This usage is somewhat common:

column<br>one|column<br>two
:--|:--
a|b

Which obviously only works with this site configuration:

[markup.goldmark.renderer]
unsafe = true

But when the above is false I expected to see the "Raw HTML omitted..." warning introduced in v0.137.0.

@jmooring
Copy link
Member Author

jmooring commented Nov 4, 2024

OK, I guess my expectations are wrong. It seems that this warning only applies to block level HTML elements. For example, this emits a warning:

<div>one</div>

But this does not:

<em>one</em>

It would nice if we emitted the warning whenever Goldmark replaces any HTML with the <!-- raw HTML omitted --> comment.

So, changing this to a proposal.

Reference: https://discourse.gohugo.io/t/warnings-when-mixing-html-and-markdown/52280

@jmooring jmooring changed the title No warning when mixing an HTML br element with Markdown Throw the "Raw HTML omitted" warning whenever Goldmark replaces raw HTML Nov 4, 2024
@jmooring jmooring added NeedsTriage and removed Bug labels Nov 4, 2024
@bep bep added this to the v0.138.0 milestone Nov 5, 2024
@bep bep self-assigned this Nov 5, 2024
@bep bep modified the milestones: v0.138.0, v0.137.1 Nov 5, 2024
@bep bep closed this as completed in 4faaaf9 Nov 5, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants