Skip to content

Use original logical index of line fallback text item - #7471

Merged
laurmaedje merged 1 commit into
mainfrom
line-text-fallback-insertion-index
Nov 27, 2025
Merged

laurmaedje merged 1 commit into
mainfrom
line-text-fallback-insertion-index

Conversation

@saecki

@saecki saecki commented Nov 25, 2025 •

Copy link
Copy Markdown
Member

Fixes #7301.
Should be merged after #7450.

The ShapedText stores the StyleChain which contains the LinkElem::current property. Previously the fallback text item received a custom LogicalIndex which would always move it to the end of the line. And thus modify_frame would generate the FrameItem::Link outside of the LinkMarker introspection tags.
The fix just stores the original LogicalIndex in addition to the fallback text ItemEntry.

@saecki saecki added the fix A bug fix. label Nov 25, 2025
@laurmaedje laurmaedje added blocked This PR is blocked by something. waiting-on-review This PR is waiting to be reviewed. labels Nov 26, 2025
@saecki saecki changed the title Line text fallback insertion index Use original line text fallback insertion index Nov 26, 2025
@saecki saecki changed the title Use original line text fallback insertion index Use original line text fallback logical index Nov 26, 2025
@saecki saecki changed the title Use original line text fallback logical index Use original logical index of line fallback text item Nov 26, 2025
@laurmaedje

Copy link
Copy Markdown
Member

That makes much more sense!

@laurmaedje laurmaedje removed the waiting-on-review This PR is waiting to be reviewed. label Nov 26, 2025
@saecki
saecki force-pushed the line-text-fallback-insertion-index branch from fdef405 to 6b0fe6d Compare November 26, 2025 18:01
@saecki
saecki force-pushed the line-text-fallback-insertion-index branch from 6b0fe6d to 1638c91 Compare November 27, 2025 14:01
@laurmaedje laurmaedje removed the blocked This PR is blocked by something. label Nov 27, 2025
@laurmaedje
laurmaedje added this pull request to the merge queue Nov 27, 2025
Merged via the queue into main with commit a4be777 Nov 27, 2025
@saecki
saecki deleted the line-text-fallback-insertion-index branch November 27, 2025 14:13
Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when determining link parent in PDF export

2 participants