diff options
| author | Georg Brandl <georg@python.org> | 2011-09-22 18:44:33 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2011-09-22 18:44:33 +0200 |
| commit | caba9b62ffa7f8f11500d85e2930453977aafe81 (patch) | |
| tree | df4de7aa28fa0fefd83776f070def9e48d441b9f | |
| parent | 06c3dcf8eeae9e5a341e8e4192534fb31361e60d (diff) | |
| download | sphinx-caba9b62ffa7f8f11500d85e2930453977aafe81.tar.gz | |
Fix #613: Allow Unicode characters in production list token names.
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | sphinx/domains/std.py | 2 | ||||
| -rw-r--r-- | sphinx/writers/latex.py | 3 |
3 files changed, 5 insertions, 2 deletions
@@ -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. diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index 1fd015ac..e2249cf3 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -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 = [] diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index ef8943ae..1418dc27 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -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): |
