summaryrefslogtreecommitdiff
path: root/pygments/util.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-05-17 09:19:35 -0700
committerTim Hatch <tim@timhatch.com>2014-05-17 09:19:35 -0700
commita62cdcfaa5a260274303cb93b92a3f2e2ce3be98 (patch)
treee7d2b4cd4e10a6e43fe4b2dc4e03ab2e827ebc20 /pygments/util.py
parent70a10a2e423d9729b62c7b56faca28889c0d688a (diff)
parentff12540907fe9d98bf02c9508a171659457b14b2 (diff)
downloadpygments-a62cdcfaa5a260274303cb93b92a3f2e2ce3be98.tar.gz
Merged in timgilbert/pygments-main/clj-keyword-fix (pull request #326)
Tweaking clojure keyword lexing
Diffstat (limited to 'pygments/util.py')
-rw-r--r--pygments/util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pygments/util.py b/pygments/util.py
index c302900f..5dc6981f 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,
+ # return 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):