Skip to content

Refactor PagesChecker: Extract duplicate regex constants #14562

@Zeglow

Description

@Zeglow

Is your suggestion for improvement related to a problem? Please describe.
The regex pattern fragment [A-Za-z]?\d* is repeated 4 times across the constants PAGES_EXP_BIBTEX and PAGES_EXP_BIBLATEX. This makes it slightly harder to maintain if the page format definition needs to change.

Describe the solution you'd like
I propose extracting the repeated pattern into a meaningful named constant to improve maintainability.

  1. Define a constant for the page number pattern. Based on the Glitter feedback, I will use a name like PAGE_NUMBER_PATTERN.
  2. Reconstruct the export patterns using this constant.

Additional context
This refactoring was approved by @calixtus (Carl Christian Snethlage) in Glitter.

Metadata

Metadata

Assignees

No fields configured for feature.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions