diff options
author | mmgilbe <mmgilbe@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-03-23 23:43:54 +0000 |
---|---|---|
committer | mmgilbe <mmgilbe@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-03-23 23:43:54 +0000 |
commit | 00ee5f95c731a0e30a3a2504ce61561b9674dd7b (patch) | |
tree | a666417d6b28dd7fb29c91fde08bce28e0b8e4c3 /docutils/parsers/rst/directives/images.py | |
parent | c75f5e75d567181ab0267cf4224a3cea59adc53f (diff) | |
download | docutils-00ee5f95c731a0e30a3a2504ce61561b9674dd7b.tar.gz |
Verifying that external targets are truly targets and not indirect
references. This is because we are now adding a "name" attribute to
references in addition to targets. Note sure if this is correct!
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1882 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/parsers/rst/directives/images.py')
-rw-r--r-- | docutils/parsers/rst/directives/images.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docutils/parsers/rst/directives/images.py b/docutils/parsers/rst/directives/images.py index a835d3d74..ab96a0a4e 100644 --- a/docutils/parsers/rst/directives/images.py +++ b/docutils/parsers/rst/directives/images.py @@ -14,6 +14,7 @@ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parsers.rst import directives, states +from docutils.nodes import whitespace_normalize_name try: import Image # PIL @@ -41,7 +42,8 @@ def image(name, arguments, options, content, lineno, if target_type == 'refuri': node_list = nodes.reference(refuri=data) elif target_type == 'refname': - node_list = nodes.reference(refname=data) + node_list = nodes.reference( + refname=data, name=whitespace_normalize_name(options['target'])) state.document.note_refname(node_list) else: # malformed target node_list = [data] # data is a system message |