-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Some Obsidian styled alerts result in invalid HTML #12828
Comments
Not a super frequent contributor to Hugo, but I think the issue is in the following lines: (blockquotes.go:162) var blockQuoteAlertRe = regexp.MustCompile(`^<p>\[!([a-zA-Z]+)\](-|\+)?[^\S\r\n]?([^\n]*)\n?`)
func resolveBlockQuoteAlert(s string) blockQuoteAlert {
m := blockQuoteAlertRe.FindStringSubmatch(s)
if len(m) == 4 {
return blockQuoteAlert{
typ: strings.ToLower(m[1]),
sign: m[2],
title: m[3],
}
}
return blockQuoteAlert{}
} This Regex terminates the title group at |
@LicketySpliket thanks, I tested your regexp, and it didn't pass all the test cases. I opted for a ... simplar non-regexp approach. |
Also remove test references to deprecated funcs now in ERROR. Closes #12828
No worries bep, thanks for testing it. |
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. |
Given the following Markdown:
and the following
render-blockquote.html
somtimes results in a closing
</p>
at the end of the titleWhat version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: