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

Issue with nested shortcodes #797

Closed
bep opened this issue Jan 15, 2015 · 2 comments · Fixed by #798
Closed

Issue with nested shortcodes #797

bep opened this issue Jan 15, 2015 · 2 comments · Fixed by #798

Comments

@bep
Copy link
Member

bep commented Jan 15, 2015

I wrote this, so I'm to blame. But my suggested fix is simple.

Example:

{{% highlight go %}}
fmt.Println("foo")
{{< getGoCode >}}
{{% highlight go %}}

As it is now, the result of getCoCode will not get highlighted, as the shortcodes are rendered and processed separately.

I suggest they continue to do so, but make sure that the rendered result of getGoCode is part of the inner argument to highlight.

This means that the result of getGoCode will get a pass through Blackfriday (even if it is marked as "HTML"), as it is part of hightlight's inner content.

Makes sense, @spf13 ?

@bep bep added the Bug label Jan 15, 2015
bep added a commit to bep/hugo that referenced this issue Jan 15, 2015
This was referenced Jan 15, 2015
@spf13
Copy link
Contributor

spf13 commented Jan 16, 2015

This makes sense to me.

@bep bep closed this as completed in #798 Jan 16, 2015
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
@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 Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants