Skip to content

Commit

Permalink
Use string template literal
Browse files Browse the repository at this point in the history
  • Loading branch information
otacke committed Aug 5, 2024
1 parent b84303e commit 0978f1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/services/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Util {
* @returns {boolean} True, if input contains right-to-left characters.
*/
static containsRTLCharacters(input) {
return new RegExp('^[^' + Util.RTL + ']*?[' + Util.RTL + ']').test(input);
return new RegExp(`^[^${Util.RTL}]*?[${Util.RTL}]`).test(input);
}

/**
Expand Down

0 comments on commit 0978f1e

Please sign in to comment.