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

Monkey-patch fix for fragments inside sections for Hugo 0.60.0+ #97

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

featherbear
Copy link
Contributor

Hacky solution to get fragments working inside section tags for Hugo 0.60.0 and later.
Seems like Hugo doesn't like the new lines?

@joshed-io
Copy link
Owner

@featherbear Thanks for the PR! Even if it's hacky, it will be great to have this working correctly.

I'm curious to know how the fix works. Is it just removing the whitespace that fixes this?

@featherbear
Copy link
Contributor Author

@featherbear Thanks for the PR! Even if it's hacky, it will be great to have this working correctly.

I'm curious to know how the fix works. Is it just removing the whitespace that fixes this?

@dzello, that's right - weird huh.

I suspect it might be some edge case in the goldmark parser

@pirocraft
Copy link

Inlining everything seems even mandatory in my case

{{/* Render .Inner before processing the shortcode. */}} {{ $_hugo_config := { "version": 1 } }} <span class='fragment {{ .Get "class" }}' {{ with .Get "index" }}data-fragment-index='{{ . }}'{{ end }}> {{ .Inner }}</span>

Thanks for the workaround @featherbear

@joshed-io joshed-io merged commit 99bbb0c into joshed-io:master Apr 9, 2021
@joshed-io
Copy link
Owner

@featherbear @pirocraft Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants