Matching from a footnote with default size may set all footnotes to 11 pt

Aperta
#4 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
documentation

Direzione di ricerca

Start in src/Code.js, at readStyle_ and inheritedTextAttributes_, where FONT_SIZE and FONT_FAMILY get filled in from the paragraph's named style through Body.getHeadingAttributes. The issue is unconfirmed, so first reproduce it in a test Google Doc: add a footnote, change only its font, run Match all footnotes, and check the sizes. Done means that footnotes keep the source footnote's inherited size (10 pt) and that the same handling covers FONT_FAMILY. No test file is named, so verify by hand in a live document.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Summary

When the source footnote's font size is inherited rather than set directly, readStyle_ fills in the size from the paragraph's named style (Normal text) via Body.getHeadingAttributes. Normal text is usually 11 pt, while Google Docs footnotes default to 10 pt. Matching from a footnote whose size was never changed may therefore set every footnote to 11 pt.

This hasn't been confirmed in a live document yet.

Steps to reproduce

  1. Add a new footnote to a document. Change only its font (e.g. to Georgia), leaving the size at the default.
  2. Put the cursor in that footnote and choose Match all footnotes to selection.
  3. Check the font size of the footnotes.

Expected

The footnotes keep the size shown in the source footnote (10 pt).

Actual (suspected)

The footnotes become 11 pt (the Normal text size).

Possible fix

When the source character is inside a footnote, don't fill in FONT_SIZE from Normal text. Either skip it when it's inherited, or treat 10 pt as the inherited footnote size. Do the same check for FONT_FAMILY.

Relevant code: readStyle_ and inheritedTextAttributes_ in src/Code.js.


Generated by Claude Code

Lingua principale
JavaScript
Stelle
0
Fork
0
Merge medio
6m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Tanman310/footnote-matcher

Tutte le issue di Tanman310/footnote-matcher

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.