Skip to content

fix: footnotes rendering causing lines to shift, other footnote rendering issues#2625

Merged
harbournick merged 3 commits intomainfrom
nick/footnote-fixes
Mar 28, 2026
Merged

fix: footnotes rendering causing lines to shift, other footnote rendering issues#2625
harbournick merged 3 commits intomainfrom
nick/footnote-fixes

Conversation

@harbournick
Copy link
Copy Markdown
Collaborator

No description provided.

@harbournick harbournick self-assigned this Mar 28, 2026
@harbournick harbournick merged commit 1f0e9e3 into main Mar 28, 2026
51 checks passed
@harbournick harbournick deleted the nick/footnote-fixes branch March 28, 2026 21:08
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 764fcd03b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

text: markerText,
dataAttrs: { [FOOTNOTE_MARKER_DATA_ATTR]: 'true' },
fontFamily: resolveMarkerFontFamily(firstTextRun),
fontSize: resolveMarkerBaseFontSize(firstTextRun) * SUBSCRIPT_SUPERSCRIPT_SCALE,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Derive footnote marker size from unscaled base font

buildMarkerRun always multiplies firstTextRun.fontSize by SUBSCRIPT_SUPERSCRIPT_SCALE, but firstTextRun.fontSize can already be scaled when the first footnote-content run is superscript/subscript (as produced by pm-adapter). In that case the marker gets scaled twice (~0.65×0.65), making the footnote number visibly too small and altering line metrics for notes that begin with superscript text. Compute the marker size from the unscaled base font before applying the marker scale.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant