You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---
title: "Demo - Summary Rendering Test 7 (😱 Bad Dream)"
date: 2024-04-25T1:54:18+08:00
draft: false
---
```c {linenos=table}
int main() {
// Is your theme able to handle this?
// Are the content below rendered correctly?
return 0; // Only see this in the summary view
}
```
<!--<!--more-->
<mark>You MUST NOT see me in the preview</mark>
## Test Heading
The content below should also be hidden in the summary view.
<!--more-->
```html
Will <!--<!--more--> cause a rendering issue?
```
What version of Hugo are you using (hugo version)?
$ hugo v0.124.1-db083b05f16c945fec04f745f0ca8640560cf1ec+extended darwin/arm64 BuildDate=2024-03-20T11:40:10Z VendorInfo=brew
Does this issue reproduce with the latest release?
YES
The text was updated successfully, but these errors were encountered:
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)
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
The text was updated successfully, but these errors were encountered: