Skip to content

Commit

Permalink
fixing xref literal bug (#92)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
  • Loading branch information
choldgraf and chrisjsewell committed Mar 1, 2020
1 parent 10ce19d commit 6a3b15a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion myst_parser/docutils_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def handle_cross_reference(self, token, destination):
if token.title:
wrap_node["title"] = token.title
self.current_node.append(wrap_node)
text_node = nodes.TextElement("", "", classes=["xref", "any"])
text_node = nodes.literal("", "", classes=["xref", "any"])
wrap_node.append(text_node)
with self.current_node_context(text_node):
self.render_children(token)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_renderers/test_docutils/test_cross_referencing.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
Title
<paragraph>
<pending_xref refdomain="True" refexplicit="True" reftarget="target" reftype="any" refwarn="True">
<TextElement classes="xref any">
<literal classes="xref any">
alt1
<paragraph>
<pending_xref refdomain="True" refexplicit="False" reftarget="target2" reftype="any" refwarn="True">
<TextElement classes="xref any">
<literal classes="xref any">
<paragraph>
<reference refuri="https://www.google.com">
alt2
Expand Down

0 comments on commit 6a3b15a

Please sign in to comment.