Goldmark are creating blockquote from HTML Comments

Hi, I am using Hugo 0.61 and the Goldmark markdown are creating blockquote element.

My Goldmark config:

markup:
  goldmark:
    renderer:
      unsafe: true

Example of my markdown:

Here the content
<!-- this is HTML comment -->

It will produce:

<p>Here the content</p>
<blockquote></blockquote>

it’s only happen if you put the HTML comment at the end of markdown.

However it can be hide by adding \ before the > like this:

Here the content
<!-- this is HTML comment --\>

But it will break the template. The HTML elements after the content will also hidden.

UPDATE:

Its only happen when you have multiple lines HTML comment at the end of content.

Here the content
<!-- this is HTML comment 
in multiple lines -->

I suspect something else is causing this. I tried what you are describing and couldn’t replicate the issue. Can you post an example theme/content on GitHub that replicates the issue?

Hi @b_rad I notice that blockquote element will be created if we put multiple HTML comment at the end of content. Here the Github repo I use to test: https://github.com/ardianta/hugo-goldmark-test

The Content:

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.

> Hi, this is quote

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.

<!-- This is HTML comment
in miltiple linte.
This will produce
blockquote element
with empty content -->

The result: