8000 make load_properties() tolerate whitespace · mgeisler/unicode-normalization@e0d33a8 · GitHub < 8000 link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png">
[go: up one dir, main page]

Skip to content

Commit e0d33a8

Browse files
committed
make load_properties() tolerate whitespace
This commit imports update to regexes in `load_properties()`, d25c39f86568a147f9b7080c25711fb1f98f056a in rust-lang/regex Does not result in any changes to tables.rs, but could if published tables are updated in the future.
1 parent c7a8bcf commit e0d33a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/unicode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ def format_table_content(f, content, indent):
172172
def load_properties(f, interestingprops):
173173
fetch(f)
174174
props = {}
175-
re1 = re.compile("^([0-9A-F]+) +; (\w+)")
176-
re2 = re.compile("^([0-9A-F]+)\.\.([0-9A-F]+) +; (\w+)")
175+
re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)")
176+
re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)")
177177

178178
for line in fileinput.input(os.path.basename(f)):
179179
prop = None

0 commit comments

Comments
 (0)
0