diff options
author | Anthon van der Neut <anthon@mnt.org> | 2019-01-11 07:56:59 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2019-01-11 07:56:59 +0100 |
commit | df566d79c442daceb169454a1003c39e9e71b325 (patch) | |
tree | 00bb3eb4aece40a5f469532972427f1c29cdaaac /compat.py | |
parent | dff05e12978e07a7cdd3c4ce09f9c058aca2e7e3 (diff) | |
download | ruamel.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.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |