gomarkdown / markdown

markdown parser and HTML renderer for Go
Other
1.41k stars 173 forks source link

Bug report: LI/UL tag not supported #256

Closed BaseMax closed 2 years ago

BaseMax commented 2 years ago

C:\Users\Max\go\pkg\mod\github.com\gomarkdown\mdtohtml@v0.0.0-20220720154245-d5126442bcee>mdtohtml test.md test.html

Input file

## Authors

- Name 1
- Name 2
- Max Base

Anyone is welcome to contribute, change or develop this project. Thanks in advance, Any comments are appreciated.

Output file

<h2>Authors
</h2>

<p>
- Name 1
- Name 2
- Max Base

Anyone is welcome to contribute, change or develop this project. Thanks in advance, Any comments are appreciated.
</p>

Expected output

Authors

Anyone is welcome to contribute, change or develop this project. Thanks in advance, Any comments are appreciated.

miekg commented 2 years ago

work fine with d5126442bcee800e6b4f1af5d17443a9eace214f of that repo

% ./mdtohtml x.md /dev/stdout

<h2>Authors</h2>

<ul>
<li>Name 1</li>
<li>Name 2</li>
<li>Max Base</li>
</ul>

<p>Anyone is welcome to contribute, change or develop this project. Thanks in advance, Any comments are appreciated.</p>
BaseMax commented 2 years ago

Thanks, So this bug was solved in the latest version of markdown?

kjk commented 2 years ago

It has always worked liked this. You can test at https://www.codeeval.dev/edit?gistid=ffd3a0a0878920b7a13ea033f8f254f9 (click run)

More likely something about your input file is incorrect in a subtle way that gets lost. For example make sure newlines are LF (unix) and not CRLF (windows).