8000 make load_properties() tolerate whitespace · mdinger/unicode-segmentation@d878d12 · GitHub
[go: up one dir, main page]

Skip to content

Commit d878d12

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 8b0f1e0 commit d878d12

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
@@ -150,8 +150,8 @@ def format_table_content(f, content, indent):
150150
def load_properties(f, interestingprops):
151151
fetch(f)
152152
props = {}
153-
re1 = re.compile("^([0-9A-F]+) +; (\w+)")
154-
re2 = re.compile("^([0-9A-F]+)\.\.([0-9A-F]+) +; (\w+)")
153+
re1 = re.compile("^ *([0-9A-F]+) *; *(\w+)")
154+
re2 = re.compile("^ *([0-9A-F]+)\.\.([0-9A-F]+) *; *(\w+)")
155155

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

0 commit comments

Comments
 (0)
0