Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
fix: fix eo and tok validation regex (#616)
Browse files Browse the repository at this point in the history
* eo.js hotfix
* tok.js hotfix
  • Loading branch information
janPensa authored Mar 27, 2022
1 parent 1aaf079 commit e25b8f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/lib/validation/languages/eo.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const INVALIDATIONS = [{
error: 'Frazo devas ne enhavi specialajn signojn',
}, {
// Sentence should not contain the letters W, Q, X, Y, or other letters that are not in the Esperanto alphabet
regex: /[qQwWxXyYÀ-ćĊ-ěĞ-ģĞ-ģĦ-ijĶ-śŞ-ūŮ-\u02AF\u1E00-\u1EFFα-ωΑ-ΩЀ-ӿ]/,
regex: /[qQwWxXyYÀ-ćĊ-ěĞ-ģĞ-ģĦ-ijĶ-śŞ-ūŮ-ʯ-ỿα-ωΑ-ΩЀ-ӿ]/,
error: 'Frazo devas ne enhavi la literojn W, Q, X, Y, aŭ aliajn ne-esperantajn literojn',
}, {
// Any words consisting of uppercase letters or uppercase letters with a period
Expand Down
4 changes: 2 additions & 2 deletions server/lib/validation/languages/tok.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const INVALIDATIONS = [{
// pronunciations, and some speakers might struggle pronouncing them.

{
// No non-Toki-Pona letters; no Sitelen Pona (\uF1900-\uF19FF are UCSUR codepoints as of 2022)
regex: /[BbCcDdFfGgHhQqRrVvXxYyZz\u00C0-\u02BF\u1E00-\u1EFF\uF1900-\uF19FF]/,
// No non-Toki-Pona letters
regex: /[BbCcDdFfGgHhQqRrVvXxYyZzÀ-ʯ-ỿ]/,
error: 'o kepeken sitelen Lasina pi toki pona taso',
}, {
// No consecutive vowels
Expand Down

0 comments on commit e25b8f2

Please sign in to comment.