HomeVyOS Platform

rm_templates: T8609: convert remaining `*$` tails in non-\S+ groups
890408169707Unpublished

Unpublished Commit ยท Learn More

  • Publishing Disabled: All publishing is disabled for this repository.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

rm_templates: T8609: convert remaining *$ tails in non-\S+ groups

CodeRabbit caught 130 more \n *$""" tails I missed in the first
pass. They exist in patterns whose trailing element is not \S+),
so the mechanical regex used in commit R52:71af7b82a6fa (which required
\S+) immediately before the newline) skipped them.

Examples, one each from the four shapes:

...(?P<as_num>\d+)\n  *$"""           ->  (?P<as_num>\d+)\s*$"""
...(?P<bw>\'\d+\')\n  *$"""           ->  (?P<bw>\'\d+\')\s*$"""
...log-neighbor-changes\n  *$"""      ->  log-neighbor-changes\s*$"""
...(?P<dynamic>dynamic)\n  *$"""      ->  (?P<dynamic>dynamic)\s*$"""

Same shape underneath as the original commit's Type A: under
re.VERBOSE the literal newline+indent is stripped, leaving a *
quantifier on whatever element preceded it. Backtracking exposure
on these is bounded (digit groups, literal flags, alternations) so
the operational impact is much smaller than the \S+ cases, but the
fix is mechanical and behavior-preserving on the inputs the parsers
actually receive.

Affects all 8 rm_templates files in scope of this PR. Full unit
suite (396 tests) passes.

Details

Provenance
cr0ntabAuthored on May 1 2026, 5:30 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.