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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion to myst loses docinfo #31

Open
cpitclaudel opened this issue Aug 19, 2021 · 3 comments
Open

Conversion to myst loses docinfo #31

cpitclaudel opened this issue Aug 19, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@cpitclaudel
Copy link

Describe the problem

Sphinx uses docinfo blocks to include information like author name or date. When these are converted from reST to MyST they become front-matter, but these isn't interpreted the same way by the MyST compiler.

For example, this document:

=======
 Title
=======

:author: Me
:date: Today

Becomes this when converted:

---
author: Me
date: Today
---

# Title

But the first one renders as this (with Sphinx):

image

while the second one renders as that:

image

This could be a bug in the MyST compiler, too.

Link to your repository or website

No response

Steps to reproduce

sphinx-quickstart, then add the contents above to a new file.

The version of Python you're using

3.8

Your operating system

GNU/Linux (Mint)

Versions of your packages

$ rst2myst --version
rst2myst, version 0.3.2
$ python3 --version
Python 3.8.10
$ sphinx-build --version
sphinx-build 3.5.4
$ pip show myst_parser | grep Version
Version: 0.15.1

Additional context

No response

@cpitclaudel cpitclaudel added the bug Something isn't working label Aug 19, 2021
@welcome
Copy link

welcome bot commented Aug 19, 2021

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@chrisjsewell
Copy link
Member

Yeh this is a tricky one. MyST does not currently support field-lists, outside of front-matter, and so you would need to e.g. "tell" myst that you want these fields shown after the first title, which is a bit ad-hoc.

We have already spoken about implementing field lists in some form, for example for use in Markdown style Python docstrings, and it would be perfectly possible to implement this with a Markdown plugin: https://mdit-py-plugins.readthedocs.io

@chrisjsewell
Copy link
Member

Note, with executablebooks/MyST-Parser#455, a more "direct" mapping should now be possible 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants