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

RST notes and warnings don't render properly #76

Open
KevinGDialpad opened this issue Dec 13, 2024 · 2 comments
Open

RST notes and warnings don't render properly #76

KevinGDialpad opened this issue Dec 13, 2024 · 2 comments
Labels
blocked The issue has a dependency on another project bug Something isn't working

Comments

@KevinGDialpad
Copy link
Contributor

RST input:

This is some text 

.. warning::

   This is a warning

This is more text

.. note::

   This is a note

And some more text

Rendered locally with restview:
image

But on Confluence:
image

I wonder if it's a Pandoc/pypandoc problem. It would be best to fix the problem there, as opposed to adding another corner case in this script.


BTW it also doesn't render well on GitHub but that's a GitHub problem and it's documented in github/markup#1682

@KevinGDialpad KevinGDialpad added the bug Something isn't working label Dec 13, 2024
@KevinGDialpad
Copy link
Contributor Author

This is indeed a Pandoc problem. From current python:3.13-slim:

root@ae04672dfe5e:/# pandoc -v | head -n 1
pandoc 2.17.1.1
root@ae04672dfe5e:/# cat input.rst 
This is some text

.. note::

   This is a note

And some more text
root@ae04672dfe5e:/# pandoc --from rst --to jira input.rst 
This is some text

Note

This is a note

And some more text

We could potentially find the start of the note by looking for the string \nNote\n\n, but Pandoc loses the indentation, so we can't tell where the note ends.

Now, the Pandoc version in the image we're using is pretty old because the image is based on Debian. Maybe we should use pandoc/core to keep up with Pandoc instead of keeping up with Python.

Anyway, the output is the same with the latest version of Pandoc:

$ docker run --rm --volume "$(pwd):/data" --user $(id -u):$(id -g) pandoc/core input.rst --from rst --to jira
This is some text

Note

This is a note

And some more text
$ docker run --rm  pandoc/core -v | head -n 1
pandoc 3.6.2

@KevinGDialpad
Copy link
Contributor Author

I filed jgm/pandoc#10561 upstream.

I think we should fix the issue there, as opposed to trying to work around the problem here.

@KevinGDialpad KevinGDialpad added the blocked The issue has a dependency on another project label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked The issue has a dependency on another project bug Something isn't working
Development

No branches or pull requests

1 participant