Fix #613: Allow Unicode characters in production list token names.

This commit is contained in:
Georg Brandl
2011-09-22 18:44:33 +02:00
parent 0e0965209d
commit 7c6e385505
3 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
Release 1.0.8 (Sep 22, 2011)
============================
* #613: Allow Unicode characters in production list token names.
* #720: Add dummy visitors for graphviz nodes for text and man.
* #704: Fix image file duplication bug.

View File

@@ -257,7 +257,7 @@ class Glossary(Directive):
return [node]
token_re = re.compile('`([a-z_][a-z0-9_]*)`')
token_re = re.compile('`(\w+)`', re.U)
def token_xrefs(text):
retnodes = []

View File

@@ -272,7 +272,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
return '\\autopageref*{%s}' % self.idescape(id)
def idescape(self, id):
return str(unicode(id).translate(tex_replace_map))
return unicode(id).translate(tex_replace_map).\
encode('ascii', 'backslashreplace').replace('\\', '_')
def generate_indices(self):
def generate(content, collapsed):