Skip to content

Commit

Permalink
feat(developer): support normalization=disabled 🙀
Browse files Browse the repository at this point in the history
- assume normalization is enabled

#10554
  • Loading branch information
srl295 committed Feb 6, 2024
1 parent 4175a34 commit 9085a4f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions common/web/types/src/kmx/kmx-plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,13 @@ export class Strs extends Section {
}
// nfd
if (opts?.nfd) {
if (!sections.meta) {
throw Error(`Internal Error: need 'meta' section to check normalization mode.`);
} else if (!sections.meta.normalizationDisabled) {
if (!sections?.meta?.normalizationDisabled) {
if (opts?.markers) {
s = MarkerParser.nfd_markers(s, false);
} else {
s = s.normalize("NFD");
}
} // else: disabled, do nothing
}
}
return s;
}
Expand Down

0 comments on commit 9085a4f

Please sign in to comment.