Skip to content

Conversation

@leonelsanchesdasilva
Copy link
Collaborator

@leonelsanchesdasilva leonelsanchesdasilva commented Feb 2, 2026

Resolves #158

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
76.85% (+0% 🔼)
3147/4095
🟡 Branches
66.7% (-0.06% 🔻)
1813/2718
🟡 Functions 70.73% 377/533
🟡 Lines
76.92% (+0% 🔼)
3009/3912
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢 xslt/xslt.ts
82.14% (+0.01% 🔼)
71.36% (-0.09% 🔻)
88.62%
82.18% (+0.01% 🔼)

Test suite run success

567 tests passing in 59 suites.

Report generated by 🧪jest coverage report action from 83f0630

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes Issue #158, which relates to incorrect ordering of text nodes relative to block elements during XSLT transformation. The fix simplifies the logic for determining an element's siblingPosition property by always using the parent's current child count rather than attempting to copy the position from input nodes.

Changes:

  • Added comprehensive test suite for text node ordering scenarios
  • Simplified siblingPosition assignment logic to always use parent's childNodes.length, making it consistent with the rest of the codebase

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/text-node-ordering.test.tsx New test file with three test cases verifying text nodes maintain correct order before, within, and interspersed with block elements
src/xslt/xslt.ts Removed incorrect conditional logic that tried to copy siblingPosition from input nodes; now consistently uses output parent's child count

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@leonelsanchesdasilva leonelsanchesdasilva merged commit 1f4bf3a into main Feb 2, 2026
9 checks passed
@leonelsanchesdasilva leonelsanchesdasilva deleted the issue-158 branch February 2, 2026 18:03
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

Successfully merging this pull request may close these issues.

Output reorders text and HTML elements

2 participants