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

Problem with html tags when converting to GFM-markdown #9792

Closed
johnd0e opened this issue May 23, 2024 · 1 comment
Closed

Problem with html tags when converting to GFM-markdown #9792

johnd0e opened this issue May 23, 2024 · 1 comment
Labels

Comments

@johnd0e
Copy link

johnd0e commented May 23, 2024

For some reason GFM requires empty line after block-level HTML-tags, otherwise Markdown in that line is not parsed.

Here is sample of correct code:

- list item
  <details>

  - subitem
  </details>

  item _continue_ **with** formatting
- next list item

However, when I convert this source to gfm with pandoc, I get empty line not after </details>, but before it.
pandoc --to=gfm -o pandoc-output.gfm.md pandoc-input.md

- list item
  <details>

  - subitem

  </details>
  item *continue* **with** formatting
- next list item

As you can see, it is rendered incorrectly:

  • list item

    • subitem
    item *continue* **with** formatting
  • next list item

This example can be seen and downloaded also here: https://gist.github.com/johnd0e/d254cc0faa99758a6b0537e1acdb2943

Pandoc version?
pandoc.exe 3.1.13

@johnd0e johnd0e added the bug label May 23, 2024
@johnd0e
Copy link
Author

johnd0e commented May 25, 2024

Specs are here: https://github.github.com/gfm/#html-block

@jgm jgm closed this as completed in a7c6a29 May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant