summaryrefslogtreecommitdiff
path: root/compat.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2019-01-11 07:56:59 +0100
committerAnthon van der Neut <anthon@mnt.org>2019-01-11 07:56:59 +0100
commitdf566d79c442daceb169454a1003c39e9e71b325 (patch)
tree00bb3eb4aece40a5f469532972427f1c29cdaaac /compat.py
parentdff05e12978e07a7cdd3c4ce09f9c058aca2e7e3 (diff)
downloadruamel.yaml-df566d79c442daceb169454a1003c39e9e71b325.tar.gz
correct checking of non-ASCII anchor names
fix provided by Dandaleon Flux vie email
Diffstat (limited to 'compat.py')
-rw-r--r--compat.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/compat.py b/compat.py
index 7355470..5cfb0bf 100644
--- a/compat.py
+++ b/compat.py
@@ -231,11 +231,11 @@ def check_namespace_char(ch):
# type: (Any) -> bool
if u'\x21' <= ch <= u'\x7E': # ! to ~
return True
- if u'\xA0' <= ch <= u'\xD7FF':
+ if u'\xA0' <= ch <= u'\uD7FF':
return True
- if (u'\xE000' <= ch <= u'\xFFFD') and ch != u'\xFEFF': # excl. byte order mark
+ if (u'\uE000' <= ch <= u'\uFFFD') and ch != u'\uFEFF': # excl. byte order mark
return True
- if u'\x10000' <= ch <= u'\x10FFFF':
+ if u'\U00010000' <= ch <= u'\U0010FFFF':
return True
return False