diff options
author | Andrew Pinkham <code@andrewsforge.com> | 2014-05-06 10:52:18 -0500 |
---|---|---|
committer | Andrew Pinkham <code@andrewsforge.com> | 2014-05-06 10:52:18 -0500 |
commit | a419d93ec28f7325d5ed8edac92b7b6f0a7c82d6 (patch) | |
tree | a25984248f91dc7f8b6601d64c3bfcf5c0e59787 /pygments/util.py | |
parent | 354626a0807e6a71d8294b170431aa2b47b402fe (diff) | |
download | pygments-a419d93ec28f7325d5ed8edac92b7b6f0a7c82d6.tar.gz |
Added comment to _surrogatepair() util.
Diffstat (limited to 'pygments/util.py')
-rw-r--r-- | pygments/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pygments/util.py b/pygments/util.py index c302900f..6b68ba79 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -208,6 +208,11 @@ def looks_like_xml(text): # Python narrow build compatibility def _surrogatepair(c): + # Given a unicode character code + # with length greater than 16 bits, + # print the two 16 bit surrogate pair. + # From example D28 of: + # http://www.unicode.org/book/ch03.pdf return (0xd7c0 + (c >> 10), (0xdc00 + (c & 0x3ff))) def unirange(a, b): |