Skip to content

Commit

Permalink
fix: add the right backtick as a special char to be capitalized
Browse files Browse the repository at this point in the history
  • Loading branch information
th0rgall committed Sep 20, 2023
1 parent accf4eb commit 290d19c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/user/createUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ exports.createUser = async (data, context) => {
// - We're also not removing diacritics.
// - Caveat: the special character rule could lead to unintended effects, depending on the user's preference
// (d'Hont, D'hont, ... will now all be D'Hont)
// However - the previous code also did this, so we're staying consistent this way.
//
// Uppercase the non-space letter following a line start, spacing, or a special character
const specialChars = '[-_\\(\\)\'"]';
const specialChars = '[-_\\(\\)\'"`´\\./]';
const capitalizerReg = new RegExp(`(?:^|\\s|${specialChars})(\\S)`, 'g');
return (
name
Expand Down

0 comments on commit 290d19c

Please sign in to comment.