Skip to content

fix: bullet/number lost when list item starts with linebreak in pdf#10045

Open
BacLuc wants to merge 1 commit into
ecamp:develfrom
BacLuc:fix/-issue-3986-list-br-indentation
Open

fix: bullet/number lost when list item starts with linebreak in pdf#10045
BacLuc wants to merge 1 commit into
ecamp:develfrom
BacLuc:fix/-issue-3986-list-br-indentation

Conversation

@BacLuc

@BacLuc BacLuc commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

The PDF RichText component prepended the bullet (•) or number by directly modifying node.children[0].children[0].content. When a
appeared as the first child of a

  • (e.g.

  • text
  • ), that
    tag has no content property so the prefix was silently lost.

    Replace the hardcoded path with a recursive prependTextContent() helper that traverses the child tree depth-first to find the first actual text node, skipping over
    and other non-text tags. Update snapshots for the empty-list case which now correctly shows the bullet.

    Fixes #3986

    …ecamp#3986)
    
    The PDF RichText component prepended the bullet (•) or number by directly
    modifying node.children[0].children[0].content. When a <br> appeared as
    the first child of a <li> (e.g. <li><br>text</li>), that <br> tag has no
    content property so the prefix was silently lost.
    
    Replace the hardcoded path with a recursive prependTextContent() helper
    that traverses the child tree depth-first to find the first actual text
    node, skipping over <br> and other non-text tags. Update snapshots for
    the empty-list case which now correctly shows the bullet.
    
    Fixes ecamp#3986
    
    Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
    @BacLuc BacLuc added the deploy! Creates a feature branch deployment for this PR label Jun 13, 2026
    @BacLuc BacLuc requested a review from a team June 13, 2026 15:23
    @BacLuc BacLuc temporarily deployed to feature-branch June 13, 2026 15:28 — with GitHub Actions Inactive
    @github-actions

    github-actions Bot commented Jun 13, 2026

    Copy link
    Copy Markdown

    Feature branch deployment ready!

    Name Link
    😎 Deployment https://pr10045.ecamp3.ch/
    🔑 Login test@example.com / test
    🕒 Last deployed at Sun Jun 14 2026 11:44:33 GMT+0200
    🔨 Latest commit 122168499ed646b7af48a3e5112fe38adf01d70c
    🔍 Latest deploy log https://github.com/ecamp/ecamp3/actions/runs/27494945781/job/81267221276
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    @BacLuc BacLuc added deploy! Creates a feature branch deployment for this PR and removed deploy! Creates a feature branch deployment for this PR labels Jun 14, 2026
    @BacLuc BacLuc temporarily deployed to feature-branch June 14, 2026 09:42 — with GitHub Actions Inactive
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    deploy! Creates a feature branch deployment for this PR

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    Manual linebreak in enumeration list is not correctly rendered in client print

    1 participant