diff options
| author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2017-10-20 20:53:47 +0000 |
|---|---|---|
| committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2017-10-20 20:53:47 +0000 |
| commit | 294963a0cbbe1a2a22aaa38eafa4a71d85c31bcf (patch) | |
| tree | 5b9fe44d722c5336f78d13c5ad38689915be5675 /docutils/transforms | |
| parent | b1740586adce3944158798aa42fc31656801d8d3 (diff) | |
| download | docutils-294963a0cbbe1a2a22aaa38eafa4a71d85c31bcf.tar.gz | |
Fix bug #331: fixed the "trim" options of the "unicode" directive.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@8188 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/transforms')
| -rw-r--r-- | docutils/transforms/references.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/docutils/transforms/references.py b/docutils/transforms/references.py index 5e9ea9686..cadf9d6da 100644 --- a/docutils/transforms/references.py +++ b/docutils/transforms/references.py @@ -692,14 +692,12 @@ class Substitutions(Transform): or 'trim' in subdef.attributes): if index > 0 and isinstance(parent[index - 1], nodes.Text): - parent.replace(parent[index - 1], - parent[index - 1].rstrip()) + parent[index - 1] = parent[index - 1].rstrip() if ('rtrim' in subdef.attributes or 'trim' in subdef.attributes): if (len(parent) > index + 1 and isinstance(parent[index + 1], nodes.Text)): - parent.replace(parent[index + 1], - parent[index + 1].lstrip()) + parent[index + 1] = parent[index + 1].lstrip() subdef_copy = subdef.deepcopy() try: # Take care of nested substitution references: |
