Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion myst_parser/docutils_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ def dict_to_fm_field_list(
if key in bibliofields:
para_nodes, _ = state.inline_text(value, line)
else:
para_nodes = [nodes.Text(value, value)]
para_nodes = [nodes.literal(value, value)]

body_children = [nodes.paragraph("", "", *para_nodes)]
body_children[0].source = self.document["source"]
Expand Down
15 changes: 10 additions & 5 deletions tests/test_renderers/fixtures/docutil_syntax_elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,19 +595,22 @@ c:
a
<field_body>
<paragraph>
1
<literal>
1
<field>
<field_name>
b
<field_body>
<paragraph>
foo
<literal>
foo
<field>
<field_name>
c
<field_body>
<paragraph>
{"d": 2}
<literal>
{"d": 2}
.

--------------------------
Expand Down Expand Up @@ -725,7 +728,8 @@ other: Something else
other
<field_body>
<paragraph>
Something else
<literal>
Something else
.

--------------------------
Expand Down Expand Up @@ -827,7 +831,8 @@ a = 1
a
<field_body>
<paragraph>
1
<literal>
1
<target ids="target" names="target">
<section ids="header-1" names="header\ 1">
<title>
Expand Down
15 changes: 10 additions & 5 deletions tests/test_renderers/fixtures/sphinx_syntax_elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,19 +632,22 @@ c:
a
<field_body>
<paragraph>
1
<literal>
1
<field>
<field_name>
b
<field_body>
<paragraph>
foo
<literal>
foo
<field>
<field_name>
c
<field_body>
<paragraph>
{"d": 2}
<literal>
{"d": 2}
.

--------------------------
Expand Down Expand Up @@ -762,7 +765,8 @@ other: Something else
other
<field_body>
<paragraph>
Something else
<literal>
Something else
.

--------------------------
Expand Down Expand Up @@ -864,7 +868,8 @@ a = 1
a
<field_body>
<paragraph>
1
<literal>
1
<target ids="target" names="target">
<section ids="header-1" names="header\ 1">
<title>
Expand Down
2 changes: 2 additions & 0 deletions tests/test_sphinx/sourcedirs/basic/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ dedication: |
abstract:
Something something **dark** side
other: Something else
other_dict:
key: value
---

(target)=
Expand Down
1 change: 1 addition & 0 deletions tests/test_sphinx/test_sphinx_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def test_basic(
"date": "2/12/1985",
"copyright": "MIT",
"other": "Something else",
"other_dict": '{"key": "value"}',
"wordcount": {"minutes": 0, "words": 57},
}

Expand Down