Skip to content
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

Page summary is null if <!-- more --> is not on a separate line #2660

Open
maufl opened this issue Oct 3, 2024 · 2 comments
Open

Page summary is null if <!-- more --> is not on a separate line #2660

maufl opened this issue Oct 3, 2024 · 2 comments

Comments

@maufl
Copy link

maufl commented Oct 3, 2024

Bug Report

For some reason the page.summary is always null when the <!-- more --> is not on it's own line. This was working before. I build Zola 0.18 and tested it again and my site still builds with this older version.

Environment

Zola version: 0.19.2

Expected Behavior

When using <!-- more --> in the page content, I would expect page.summary to contain a string.

Current Behavior

page.summary is null if <!-- more --> is preceded by anything else on the same line.

Step to reproduce

Test to reproduce that fails. Add to components/markdown/tests/summary.rs

#[test]
fn summary_matches_at_end_of_line() {
    let rendered = get_rendered(
        r#"
Hello world, with extra content <!-- more -->

More content in next paragraph"#,
    );
    assert!(rendered.summary.is_some());
}
@Keats
Copy link
Collaborator

Keats commented Oct 3, 2024

It was due to a change in the markdown library. It's been fixed for inline HTML (#2606) but no markdown it seems

@clarfonthey
Copy link
Contributor

#2581 is still open as a proper fix for this, although it also allows <!-- more --> mid-paragraph which was considered contentious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@maufl @Keats @clarfonthey and others