Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 FIX: Front matter -> sphinx metadata regression #480

Merged
merged 1 commit into from Dec 29, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion myst_parser/docutils_renderer.py
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
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
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
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
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