Skip to content

Commit

Permalink
feat(core): ldml updates per code review 🙀
Browse files Browse the repository at this point in the history
- remove stray change to kmx_processevent.cpp
- fix escaping of syntax chars
- fix comment per review

For: #10319
srl295 committed Jan 18, 2024
1 parent c0928e1 commit 763bc96
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/web/types/src/util/util.ts
Original file line number Diff line number Diff line change
@@ -127,7 +127,7 @@ function escapeRegexChar(ch: string) {
}

/** chars that must be escaped: syntax, C0 + C1 controls */
const REGEX_SYNTAX_CHAR = /^[\u0000-\u001F\u007F-\u009F{}\[\]\\?.^$*-]$/;
const REGEX_SYNTAX_CHAR = /^[\u0000-\u001F\u007F-\u009F{}\[\]\\?.^$*()/-]$/;

function escapeRegexCharIfSyntax(ch: string) {
// escape if syntax or not valid
2 changes: 1 addition & 1 deletion core/src/kmx/kmx_processevent.cpp
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ using namespace kmx;

/* Globals */

KMX_BOOL km::core::kmx::g_debug_ToConsole = TRUE;
KMX_BOOL km::core::kmx::g_debug_ToConsole = FALSE;
KMX_BOOL km::core::kmx::g_debug_KeymanLog = TRUE;
KMX_BOOL km::core::kmx::g_silent = FALSE;

3 changes: 2 additions & 1 deletion core/src/ldml/ldml_markers.cpp
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@ namespace core {
namespace ldml {


const std::u32string REGEX_PREFIX = U"\\uffff\\u0008"; // does not include '\\' because it might be a range
// the 'prefix part' of a regex marker sequence, followed by RAW_PREFIX or REGEX_ANY_MATCH
const std::u32string REGEX_PREFIX = U"\\uffff\\u0008";
const std::u32string RAW_PREFIX = U"\uffff\u0008";
const std::u32string REGEX_ANY_MATCH = U"[\\u0001-\\ud7fe]";

0 comments on commit 763bc96

Please sign in to comment.