Open Junyi-99 opened 7 months ago
As a rendering engine, Hugo simply uses string.find("<!--more-->")
instead of using lexical parsing for <! --
, which is a irresponsible behavior, as it makes it not easy for the user to debug.
I suggest that Hugo warns the user that there's a syntax error somewhere instead of just displaying the rendering crashed page. (if possible.)
This PR (#12437) provides a mitigation (since we should put <!--more-->
at the beginning of a line)
I'm closing this. I'm not going to complicate the parser to fix this. If this problem is real (which I doubt), it can be easily avoided by the user.
Hugo will produce a string of
e>
Just try this in any of a theme:
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
YES