Skip to content

Shorten the handling of /A and /a page labels - #21814

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:PageLabels-letters
Aug 23, 2026
Merged

Shorten the handling of /A and /a page labels#21814
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:PageLabels-letters

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

I happened to glance at this code, and noticed that using the style-value itself to compute the current character would shorten this code a little bit.

Note that this particular page label format seems to be somewhat rarely used in practice, compared to e.g. the roman numerals format, which probably isn't that strange given its definition: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2096063

I happened to glance at this code, and noticed that using the style-value *itself* to compute the current character would shorten this code a little bit.

Note that this particular page label format seems to be somewhat rarely used in practice, compared to e.g. the roman numerals format, which probably isn't that strange given its definition: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#G11.2096063
@codecov-commenter

codecov-commenter commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.19%. Comparing base (0f26334) to head (3451fc5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21814      +/-   ##
==========================================
- Coverage   90.20%   90.19%   -0.01%     
==========================================
  Files         264      264              
  Lines       67339    67336       -3     
==========================================
- Hits        60741    60733       -8     
- Misses       6598     6603       +5     
Flag Coverage Δ
browsertest 66.31% <ø> (-0.03%) ⬇️
fonttest 8.91% <ø> (ø)
integrationtest 69.40% <ø> (+<0.01%) ⬆️
unittest 58.36% <ø> (-0.01%) ⬇️
unittestcli 56.94% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timvandermeij
timvandermeij merged commit 3b77a80 into mozilla:master Aug 23, 2026
21 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Thank you for improving this code!

@Snuffleupagus
Snuffleupagus deleted the PageLabels-letters branch August 23, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants