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

Highlight escape mismatch #9553

Closed
bep opened this issue Feb 23, 2022 · 1 comment
Closed

Highlight escape mismatch #9553

bep opened this issue Feb 23, 2022 · 1 comment

Comments

@bep
Copy link
Member

bep commented Feb 23, 2022

While consolidating the highlight code, I have a failing test pointing at gohtml.EscapeString(code) -- which we do on highlighting using the highlight template func/shortcode when no lexer is found and guessSyntax is not enabled. We're not doing the same escaping in the Goldmark highlight plugin.

I'm creating this as a tracking issue.

@bep bep added the Bug label Feb 23, 2022
@bep bep added this to the v0.93.0 milestone Feb 23, 2022
bep added a commit to bep/hugo that referenced this issue Feb 23, 2022
bep added a commit to bep/hugo that referenced this issue Feb 23, 2022
bep added a commit to bep/hugo that referenced this issue Feb 23, 2022
bep added a commit to bep/hugo that referenced this issue Feb 23, 2022
bep added a commit to bep/hugo that referenced this issue Feb 24, 2022
You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`).

We also used this new hook to add support for diagrams in Hugo:

* Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams.
* Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information.

Updates gohugoio#7765
Closes gohugoio#9538
Fixes gohugoio#9553
Fixes gohugoio#8520
Fixes gohugoio#6702
Fixes gohugoio#9558
bep added a commit to bep/hugo that referenced this issue Feb 24, 2022
You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`).

We also used this new hook to add support for diagrams in Hugo:

* Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams.
* Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information.

Updates gohugoio#7765
Closes gohugoio#9538
Fixes gohugoio#9553
Fixes gohugoio#8520
Fixes gohugoio#6702
Fixes gohugoio#9558
bep added a commit to bep/hugo that referenced this issue Feb 24, 2022
You can now create custom hook templates for code blocks, either one for all (`render-codeblock.html`) or for a given code language (e.g. `render-codeblock-go.html`).

We also used this new hook to add support for diagrams in Hugo:

* Goat (Go ASCII Tool) is built-in and enabled by default; just create a fenced code block with the language `goat` and start draw your Ascii diagrams.
* Another popular alternative for diagrams in Markdown, Mermaid (supported by GitHub), can also be implemented with a simple template. See the Hugo documentation for more information.

Updates gohugoio#7765
Closes gohugoio#9538
Fixes gohugoio#9553
Fixes gohugoio#8520
Fixes gohugoio#6702
Fixes gohugoio#9558
@bep bep closed this as completed in 08fdca9 Feb 24, 2022
@github-actions
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 Mar 18, 2022
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

1 participant