-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtext-validator.toml
40 lines (37 loc) · 1.1 KB
/
text-validator.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
["text_validator.plugins.whitespace"]
CHECK_CRLF = true
CHECK_TABS = true
CHECK_TRAILING_WHITESPACE = true
CHECK_NO_EOF_NEWLINE = true
["text_validator.plugins.unicode"]
CONFIRM_UTF_8_NFC = true
["text_validator.plugins.ref_line_format"]
REF_REGEX = "(\\d+\\.\\d+$|p\\d+\\.head+$|p\\d+\\.subscript+$|\\d+\\.head+$||\\d+\\.note+$|\\d+\\.\\d+\\.\\d+a$)"
["text_validator.plugins.characters"]
REPLACE_CHARS = [
# bad character, suggested replacement
["\u02BC", "\u2019"],
["\u1FBF", "\u2019"],
["\u037E", "\u003B"],
["\u0387", "\u00B7"],
["\u0374", "\u02B9"],
["\u03D5", "\u03C6"],
["\u03D1", "\u03B8"],
]
TOKEN_REGEXES = [
# each whitespace-separated token must match one of these regexes
"\\d+\\.\\d+\\.\\d+$",
"\\d+.[A-F]\\.\\d+$",
"\\d+\\.\\d+\\.\\d+[a-z]$",
"\\d+\\.\\d+\\.\\d+\\-\\d+$",
"\\d+\\.title$",
"\\d+\\.note$",
"title\\.0$",
"[\u201C(]*[A-Za-z\u2019\\-]+[.,:;)\u201D]?$",
"[«(\u201C\u2019]*[\u0370-\u03FF\u1F00-\u1FFF]+\u2019?[.,:;»)·\u2014\u201D]*$",
"\u2014$",
"\\([A-Za-z]\\)$",
"ξβʹ$",
"εʹ$",
"ιʹ$",
]