Skip to content
Discussion options

You must be logged in to vote

The more I think about this the more it seems that we just need to add the fallback to Text in the heuristic rules for single digit extensions in order to get the desired (and expected) outcome.

- extensions: ['.1', '.2', '.3', '.4', '.5', '.6', '.7', '.8', '.9']
  rules:
  - language: Roff Manpage
    and:
    - named_pattern: mdoc-date
    - named_pattern: mdoc-title
    - named_pattern: mdoc-heading
  - language: Roff Manpage
    and:
    - named_pattern: man-title
    - named_pattern: man-heading
  - language: Roff
    pattern: '^\.(?:[A-Za-z]{2}(?:\s|$)|\\")'
  - language: Text # <------ Adding this

Explanation:

This will make sure that even if the Manpage strategy selects Roff Manpage

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
8 replies
@DecimalTurn
Comment options

@DecimalTurn
Comment options

@DecimalTurn
Comment options

@Alhadis
Comment options

Alhadis Nov 13, 2025
Collaborator

@DecimalTurn
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by DecimalTurn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants