Skip to content

Commit 71f3fe7

Browse files
committed
Document Line_Break and Word_Break support
1 parent d707264 commit 71f3fe7

File tree

1 file changed

+85
-2
lines changed

1 file changed

+85
-2
lines changed

property-escapes.md

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,59 @@ Note that the `General_Category=` prefix may be used, e.g. `\p{General_Category=
406406

407407
Category aliases may be used, e.g. `\p{Lc}` or `\p{General_Category=Lc}`, although IMHO it’s more readable to stick to the canonical category names listed above.
408408

409+
### `Line_Break`
410+
411+
Possible values:
412+
413+
```sh
414+
$ node -e 'require("unicode-9.0.0").Line_Break.forEach(v => { console.log(`\\p{Line_Break=${v}}`); })'
415+
\p{Line_Break=Alphabetic}
416+
\p{Line_Break=Ambiguous}
417+
\p{Line_Break=Break_After}
418+
\p{Line_Break=Break_Before}
419+
\p{Line_Break=Break_Both}
420+
\p{Line_Break=Break_Symbols}
421+
\p{Line_Break=Carriage_Return}
422+
\p{Line_Break=Close_Parenthesis}
423+
\p{Line_Break=Close_Punctuation}
424+
\p{Line_Break=Combining_Mark}
425+
\p{Line_Break=Complex_Context}
426+
\p{Line_Break=Conditional_Japanese_Starter}
427+
\p{Line_Break=Contingent_Break}
428+
\p{Line_Break=E_Base}
429+
\p{Line_Break=E_Modifier}
430+
\p{Line_Break=Exclamation}
431+
\p{Line_Break=Glue}
432+
\p{Line_Break=H2}
433+
\p{Line_Break=H3}
434+
\p{Line_Break=Hebrew_Letter}
435+
\p{Line_Break=Hyphen}
436+
\p{Line_Break=Ideographic}
437+
\p{Line_Break=Infix_Numeric}
438+
\p{Line_Break=Inseparable}
439+
\p{Line_Break=JL}
440+
\p{Line_Break=JT}
441+
\p{Line_Break=JV}
442+
\p{Line_Break=Line_Feed}
443+
\p{Line_Break=Mandatory_Break}
444+
\p{Line_Break=Next_Line}
445+
\p{Line_Break=Nonstarter}
446+
\p{Line_Break=Numeric}
447+
\p{Line_Break=Open_Punctuation}
448+
\p{Line_Break=Postfix_Numeric}
449+
\p{Line_Break=Prefix_Numeric}
450+
\p{Line_Break=Quotation}
451+
\p{Line_Break=Regional_Indicator}
452+
\p{Line_Break=Space}
453+
\p{Line_Break=Surrogate}
454+
\p{Line_Break=Unknown}
455+
\p{Line_Break=Word_Joiner}
456+
\p{Line_Break=ZWJ}
457+
\p{Line_Break=ZWSpace}
458+
```
459+
460+
Note that property value aliases may be used as well, e.g. `\p{Line_Break=AL}`, although IMHO it’s more readable to stick to the canonical property values listed above.
461+
409462
### `Script` & `Script_Extensions`
410463

411464
The sets of possible values for `Script` and `Script_Extensions` are identical:
@@ -553,6 +606,38 @@ $ node -e 'require("unicode-9.0.0").Script_Extensions.forEach(s => { console.log
553606

554607
Note that script name aliases may be used as well, e.g. `\p{Script_Extensions=Aghb}`, although IMHO it’s more readable to stick to the canonical script names listed above.
555608

609+
### `Word_Break`
610+
611+
Possible values:
612+
613+
```sh
614+
$ node -e 'require("unicode-9.0.0").Word_Break.forEach(v => { console.log(`\\p{Word_Break=${v}}`); })'
615+
\p{Word_Break=ALetter}
616+
\p{Word_Break=CR}
617+
\p{Word_Break=Double_Quote}
618+
\p{Word_Break=E_Base}
619+
\p{Word_Break=E_Base_GAZ}
620+
\p{Word_Break=E_Modifier}
621+
\p{Word_Break=Extend}
622+
\p{Word_Break=ExtendNumLet}
623+
\p{Word_Break=Format}
624+
\p{Word_Break=Glue_After_Zwj}
625+
\p{Word_Break=Hebrew_Letter}
626+
\p{Word_Break=Katakana}
627+
\p{Word_Break=LF}
628+
\p{Word_Break=MidLetter}
629+
\p{Word_Break=MidNum}
630+
\p{Word_Break=MidNumLet}
631+
\p{Word_Break=Newline}
632+
\p{Word_Break=Numeric}
633+
\p{Word_Break=Other}
634+
\p{Word_Break=Regional_Indicator}
635+
\p{Word_Break=Single_Quote}
636+
\p{Word_Break=ZWJ}
637+
```
638+
639+
Note that property value aliases may be used as well, e.g. `\p{Word_Break=DQ}`, although IMHO it’s more readable to stick to the canonical property values listed above.
640+
556641
## Binary properties
557642

558643
All binary properties in the Unicode standard are supported:
@@ -643,7 +728,6 @@ The abovementioned list of properties and values goes a long way towards fulfill
643728
* `Hangul_Syllable_Type`
644729
* `Joining_Group`
645730
* `Joining_Type`
646-
* `Line_Break`
647731
* `Lowercase_Mapping`
648732
* `Name` & `Name_Alias`
649733
* `NFC_Quick_Check`
@@ -660,4 +744,3 @@ The abovementioned list of properties and values goes a long way towards fulfill
660744
* `Simple_Uppercase_Mapping`
661745
* `Titlecase_Mapping`
662746
* `Uppercase_Mapping`
663-
* `Word_Break`

0 commit comments

Comments
 (0)