Skip to content

Commit

Permalink
refactor: 0x200C-0x200D from range to just two code points
Browse files Browse the repository at this point in the history
  • Loading branch information
lddubeau committed Jun 21, 2019
1 parent 3fc1626 commit bed1c91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xml/1.0/ed5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const CHAR = "\t\n\r\u0020-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}";
export const S = " \t\r\n";

// tslint:disable-next-line:max-line-length
export const NAME_START_CHAR = ":A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}";
export const NAME_START_CHAR = ":A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}";

export const NAME_CHAR =
`-${NAME_START_CHAR}.0-9\u00B7\u0300-\u036F\u203F-\u2040`;
Expand Down Expand Up @@ -94,7 +94,8 @@ export function isNameStartChar(c: number): boolean {
(c >= 0x00F8 && c <= 0x02FF) ||
(c >= 0x0370 && c <= 0x037D) ||
(c >= 0x037F && c <= 0x1FFF) ||
(c >= 0x200C && c <= 0x200D) ||
c === 0x200C ||
c === 0x200D ||
(c >= 0x2070 && c <= 0x218F) ||
(c >= 0x2C00 && c <= 0x2FEF) ||
(c >= 0x3001 && c <= 0xD7FF) ||
Expand Down

0 comments on commit bed1c91

Please sign in to comment.