generated from greek-learner-texts/text-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtext-validator.toml
30 lines (27 loc) · 894 Bytes
/
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
["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+.\\d+$"
["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+$", # reference
"[«(]*[\u0370-\u03FF\u1F00-\u1FFF\\-]+({\\.\\d+}[\u0370-\u03FF\u1F00-\u1FFF\\-]+)?\u2019?[.,:;»)·]*$", # greek token (with hyphens)
"[A-Za-z]+", # english token
"{\\.\\d+}", # milestone token
]