Skip to content

Added additional an empty html comment when convert html to markdown! #1029

Open
@mrhdias

Description

@mrhdias

Every time that I run this code to convert html to markdown an empty html additional comment is added to result.

const converter = new showdown.Converter();
console.log(converter.makeMarkdown(`<h1 id="test">Test1</h1>
<h2 id="test2">Test2</h2>
<ol>
<li>abc</li>
<li>def</li>
<li>ghi</li>
</ol>
<p>Test3</p>`));

Output:

# Test1

## Test2

1. abc
2. def
3. ghi

<!-- --> <===== Aditional empty comment

Test3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions