Skip to content

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

Closed
@johnd0e

Description

@johnd0e

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions