diff options
author | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-28 15:51:39 +0000 |
---|---|---|
committer | strank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2008-07-28 15:51:39 +0000 |
commit | 8017dc8fc6c4219fb6cb8472b079b0ac81d576fe (patch) | |
tree | b294e98dd4539e7f110d103454ff3e440329ad17 | |
parent | 2ec2ed70dfae0edfb9c8df437cfa20b41e971fd1 (diff) | |
download | docutils-adjacent-citations.tar.gz |
Adapt to Text nodes being unicode and thus immutable.adjacent-citations
git-svn-id: http://svn.code.sf.net/p/docutils/code/branches/adjacent-citations@5622 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r-- | docutils/writers/latex2e/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docutils/writers/latex2e/__init__.py b/docutils/writers/latex2e/__init__.py index 4db7b67bf..9205faf83 100644 --- a/docutils/writers/latex2e/__init__.py +++ b/docutils/writers/latex2e/__init__.py @@ -1123,6 +1123,10 @@ class LaTeXTranslator(nodes.NodeVisitor): if not self.inside_citation_reference_label: self.body.append('\\cite{') self.inside_citation_reference_label = 1 + else: + assert self.body[-1] in (' ', '\n'),\ + 'unexpected non-whitespace while in reference label' + del self.body[-1] else: href = '' if 'refid' in node: @@ -1142,8 +1146,6 @@ class LaTeXTranslator(nodes.NodeVisitor): and next.astext() in (' ', '\n')): if next_siblings[1].__class__ == node.__class__: followup_citation = True - # remove the space/newline: - next.data = '' if followup_citation: self.body.append(',') else: |