Skip to content

Some Obsidian styled alerts result in invalid HTML #12828

@McShelby

Description

@McShelby

Given the following Markdown:

> [!caution] Callouts can have custom titles
> Like this one.

> [!caution] Title-only callout

> [!note]- Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when the callout is collapsed

> [!note]+ Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when the callout is collapsed

> [!info] Can callouts be nested?
> > [!important] Yes!, they can.
> > > [!tip]  You can even use multiple layers of nesting.

and the following render-blockquote.html

{{ warnf "%s" .AlertTitle }}

somtimes results in a closing </p> at the end of the title

WARN  Callouts can have custom titles
WARN  Title-only callout</p>
WARN  Are callouts foldable?
WARN  You can even use multiple layers of nesting.</p>
WARN  Yes!, they can.</p>
WARN  Can callouts be nested?</p>

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

$ hugo version
hugo v0.134.0-77df7bbbff8ce6b56ed693270088de973a87d5ce+extended windows/amd64 BuildDate=2024-09-03T09:54:22Z VendorInfo=gohugoio

Does this issue reproduce with the latest release?

Yes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions