diff options
| author | Georg Brandl <georg@python.org> | 2010-01-07 19:19:58 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-01-07 19:19:58 +0100 |
| commit | 51261adf4a87e8e70838fd59fe51b031147a0d5a (patch) | |
| tree | 2b356df7daeca84fa324bd69ae4e84cff7240ed2 /sphinx/util | |
| parent | bd97c900b5e07ad26393cdca2df38944c974eeee (diff) | |
| parent | 995e1df9e1ca485f9b1b690fbb64bfc3d544f563 (diff) | |
| download | sphinx-51261adf4a87e8e70838fd59fe51b031147a0d5a.tar.gz | |
merge with trunk
Diffstat (limited to 'sphinx/util')
| -rw-r--r-- | sphinx/util/__init__.py | 2 | ||||
| -rw-r--r-- | sphinx/util/texescape.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py index 3ceafa5e..b7f756fc 100644 --- a/sphinx/util/__init__.py +++ b/sphinx/util/__init__.py @@ -280,7 +280,6 @@ def patfilter(names, pat): Return the subset of the list NAMES that match PAT. Adapted from fnmatch module. """ - result = [] if pat not in _pat_cache: _pat_cache[pat] = re.compile(_translate_pattern(pat)) match = _pat_cache[pat].match @@ -411,7 +410,6 @@ def movefile(source, dest): def copytimes(source, dest): """Copy a file's modification times.""" st = os.stat(source) - mode = stat.S_IMODE(st.st_mode) if hasattr(os, 'utime'): os.utime(dest, (st.st_atime, st.st_mtime)) diff --git a/sphinx/util/texescape.py b/sphinx/util/texescape.py index 00d0325c..73790829 100644 --- a/sphinx/util/texescape.py +++ b/sphinx/util/texescape.py @@ -99,8 +99,9 @@ tex_replacements = [ ] tex_escape_map = {} -tex_hl_escape_map = {} -_new_cmd_chars = {ord(u'\\'): u'@', ord(u'{'): u'[', ord(u'}'): u']'} +tex_hl_escape_map_old = {} # replacement map for Pygments <= 1.1 +tex_hl_escape_map_new = {} # replacement map for Pygments >= 1.2 +_old_cmd_chars = {ord(u'\\'): u'@', ord(u'{'): u'[', ord(u'}'): u']'} def init(): for a, b in tex_replacements: @@ -108,4 +109,5 @@ def init(): for a, b in tex_replacements: if a in u'[]{}\\': continue - tex_hl_escape_map[ord(a)] = b.translate(_new_cmd_chars) + tex_hl_escape_map_new[ord(a)] = b + tex_hl_escape_map_old[ord(a)] = b.translate(_old_cmd_chars) |
