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

</div> tag shows up inside <code> for some unknown reason. #6759

Closed
ec1warc1 opened this issue Jan 16, 2020 · 4 comments
Closed

</div> tag shows up inside <code> for some unknown reason. #6759

ec1warc1 opened this issue Jan 16, 2020 · 4 comments

Comments

@ec1warc1
Copy link

What version of Hugo are you using (hugo version)?

$ hugo version #issue occurs with this release:
Hugo Static Site Generator v0.62.2-83E50184/extended linux/amd64 BuildDate: 2020-01-05T18:57:23Z

Does this issue reproduce with the latest release?

This issue does not occur when using an older release:

Hugo Static Site Generator v0.57.2/extended linux/amd64 BuildDate: 2019-08-18T05:29:32Z

docsy-homepage-extra-div

This file seems to be where this is happening: $MY_HUGO_SITE/themes/docsy/layouts/shortcodes/blocks/link-down.html
{{ with .Parent }} {{ $id := $.Get "id" | default (printf "td-block-%d" ( add .Ordinal 1 )) }} {{ $color := $.Get "color" | default "blue" }} <a class="btn btn-link text-{{ $color }}" href="#{{ $id }}"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a> {{ else }} {{ errorf "The link-down shortcode is supposed to be nested inside a shortcode"}} {{ end }}

@satotake
Copy link
Contributor

From v0.60, Hugo uses goldmark as a default markdown handler instead blackfriday .
While different behaviors between markdown processors result in it, this is specification of commonmark. (related #6553)

./themes/docsy/layouts/shortcodes/blocks/cover.html includes {{ .Inner | markdownify }} .
For example, the intermediate of ./content/no/_index.html is

        <p class="lead mt-5">TechOS kan nå lastes ned i <a href="#">AppStore!</a></p>
	<div class="mx-auto mt-5">

	</div>
</div>

(Note: blank line following tab char)

markdownify converts into

....
	<p class="lead mt-5">TechOS kan nå lastes ned i <a href="#">AppStore!</a></p>
	<div class="mx-auto mt-5">
<pre><code>&lt;/div&gt;
</code></pre>
</div>

As a temporal workaround, you can avoid this by removing tab char just after {{< blocks/link-down color="info" >}}.

And this is not markdown but raw html so you can also avoid it by removing markdownify from {{ .Inner | markdownify}} in cover.html

@ec1warc1
Copy link
Author

ec1warc1 commented Apr 6, 2020

I removed | markdownify from cover.html and it worked. Thanks!

@stale
Copy link

stale bot commented Aug 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Aug 8, 2020
@stale stale bot closed this as completed Sep 7, 2020
@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 Jan 29, 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

2 participants