chore(scripts): teach the normaliser the brand inside a CamelCase identifier
The fork's profile-preview line names a Readiness state NotYetOnCurare, and the normaliser's \bCurare\b rule cannot see a brand that has no word boundary in front of it: the first rewrite of the eleven new commits left seventeen occurrences of it in code, tests and the note. One rule, for a brand preceded by a lower-case letter or digit and followed by an upper case letter or the end of the word, maps it to NotYetOnMantra. Only the Curare generation gets the rule: "Curated" is product vocabulary at the tip (CuratedSchemaEvent) and a CamelCase-embedded Curated is therefore not a brand. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -85,6 +85,9 @@ _RULES = [
|
||||
(r'(?<![A-Za-z0-9])curare(?=_)', 'mantra'), (r'(?<=_)curare(?![A-Za-z0-9])', 'mantra'),
|
||||
# a package name in prose, without its trailing dot
|
||||
(r'to\.curare\b', 'press.mantra'), (r'com\.it\.curated\b', 'press.mantra'),
|
||||
# the brand embedded in a CamelCase identifier, where \b cannot fire: `NotYetOnCurare`
|
||||
# (a Readiness state of the profile preview, 8973c005) -> `NotYetOnMantra`
|
||||
(r'(?<=[a-z0-9])Curare(?=[A-Z]|\b)', 'Mantra'),
|
||||
# the brand word itself, in comments, string values and docs
|
||||
(r'\bCurare\b', 'Mantra'),
|
||||
(r'\bcurare\b', 'mantra'),
|
||||
|
||||
Reference in New Issue
Block a user