Skip to content

Conversation

@DopiGFX
Copy link
Contributor

@DopiGFX DopiGFX commented Jan 11, 2026

What did you fix?

closes #837


Reproduction steps

See tests


Evidence/screenshot/link to line

Considerations

  • Does this contain a new dependency? [No]
  • Does this introduce opinionated data formatting or manual data entry? [No] Refer to fix(#833): filter graves, umlaut-o #836
  • Does this pr include updated data files in a separate commit that can be reverted for a clean code-only pr? [Yes]
  • Have I run the linter? [Yes]
  • Is is a bug fix, feature request, or enhancement? [Bug Fix]

Summary by CodeRabbit

  • Chores
    • Updated title-casing logic to modify character exclusion rules in the build parser.

✏️ Tip: You can customize this high-level summary in your review settings.

@DopiGFX DopiGFX requested a review from a team as a code owner January 11, 2026 00:10
@DopiGFX DopiGFX requested a review from TobiTenno January 11, 2026 00:10
@coderabbitai
Copy link

coderabbitai bot commented Jan 11, 2026

📝 Walkthrough

Walkthrough

Updates the title-casing regex pattern in the parser to exclude additional special characters (é, ā, \*) from capitalization in addition to the previously excluded ö, addressing issues with game names containing these characters.

Changes

Cohort / File(s) Summary
Title-casing regex enhancement
build/parser.mjs
Modified negative lookbehind pattern from /(?<!ö)\b\w/g to /(?<![öéā\\*])\b\w/ to prevent capitalization after special characters é, ā, and \*. Note: Syntax review recommended—the replacement function appears malformed with unexpected comma placement.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • AyAyEm

Poem

🐰 A comma crept where arrows flew,
Special chars now skipped (or two?),
*B\tches, Cathés, and Honoria too,
Syntax check before we're through!

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @build/parser.mjs:
- Line 30: The .replace call currently contains a malformed regex and misplaced
comma/callback; fix the call by closing the regex literal after \w, add the
global flag (g) to the regex, move the comma so the replacement callback is
passed as the second argument to .replace, and keep the existing callback logic
that uppercases the captured letter (the current anonymous (l) =>
l.toUpperCase() should remain as the second argument to .replace).
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56c9eac and 3e0f4c5.

📒 Files selected for processing (1)
  • build/parser.mjs
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.

Applied to files:

  • build/parser.mjs

str
.toLowerCase()
.replace(/(?<!ö)\b\w/g, (l) => l.toUpperCase())
.replace(/(?<![öéā*])\b\w, (l) => l.toUpperCase())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical syntax error in regex pattern.

The regex pattern is malformed and will cause a JavaScript error. The closing / delimiter is missing after \w, the g flag is missing, and the comma and callback function are incorrectly placed inside the pattern.

🐛 Fix the regex syntax
-    .replace(/(?<![öéā*])\b\w, (l) => l.toUpperCase())
+    .replace(/(?<![öéā*])\b\w/g, (l) => l.toUpperCase())

The correct syntax is:

  • Close the regex pattern with / after \w
  • Add the g flag for global replacement
  • Place the comma after the regex, not inside it
  • Then provide the replacement callback function
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.replace(/(?<![öéā*])\b\w, (l) => l.toUpperCase())
.replace(/(?<![öéā*])\b\w/g, (l) => l.toUpperCase())
🤖 Prompt for AI Agents
In @build/parser.mjs at line 30, The .replace call currently contains a
malformed regex and misplaced comma/callback; fix the call by closing the regex
literal after \w, add the global flag (g) to the regex, move the comma so the
replacement callback is passed as the second argument to .replace, and keep the
existing callback logic that uppercases the captured letter (the current
anonymous (l) => l.toUpperCase() should remain as the second argument to
.replace).

@DopiGFX
Copy link
Contributor Author

DopiGFX commented Jan 11, 2026

Unfortunately, I made a mistake. I'm submitting a new pull request.

@DopiGFX DopiGFX closed this Jan 11, 2026
@DopiGFX DopiGFX deleted the fix-837 branch January 11, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] More typo's found

1 participant