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

Bad definition list parsing #35

Closed
jgm opened this issue Apr 4, 2020 · 3 comments
Closed

Bad definition list parsing #35

jgm opened this issue Apr 4, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@jgm
Copy link
Owner

jgm commented Apr 4, 2020

% commonmark -xdefinition_lists
## Blah

`-v`, `--version`

:   Print version.

`-h`, `--help`

:   Show usage message.
^D
<h2 id="blah">Blah</h2>
<dl>
<dt><code>-v</code>, <code>--version</code></dt>
<dd>
<p>Print version.</p>
</dd>
</dl>
<dl>
<dt><code>-h</code>, <code>--help</code></dt>
<dd>
<p>Show usage message.</p>
</dd>
</dl>

This produces two dls rather than one. But if you remove the heading, you get one as intended.

@jgm jgm added the bug Something isn't working label Apr 4, 2020
@jgm
Copy link
Owner Author

jgm commented Apr 4, 2020

Actually it doesn't matter if the first line is a heading.
Could be anything.

@jgm
Copy link
Owner Author

jgm commented Apr 4, 2020

Doesn't matter whether the def list is tight or loose.

@jgm
Copy link
Owner Author

jgm commented Apr 4, 2020

Minimal repro:

x

a
:    b

c
:    d

jgm added a commit that referenced this issue Apr 4, 2020
@jgm jgm closed this as completed in b0794e2 Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant