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

Triple-quoted code breaks list #238

Open
gagern opened this issue Jun 23, 2020 · 0 comments
Open

Triple-quoted code breaks list #238

gagern opened this issue Jun 23, 2020 · 0 comments

Comments

@gagern
Copy link

gagern commented Jun 23, 2020

While triple codes can be used to introduce a fenced code block, they may also be used to mark an inline code span. However for the sake of list item formatting, this distinction is broken:

* First item

  ```Triple quoted code```

* Second list item

  ```More such code```
* Last list item

This ends the list after the first item, starting a new list for the second item. The bullet of the third item gets consumed into the body of the second list item. Taken together I get

<li><p>First item</p>

<p><code>Triple quoted code</code></p></li>
</ul>

<ul>
<li><p>Second list item</p>

<p><code>More such code</code>
* Last list item</p></li>
</ul>
gagern added a commit to gagern/hoextdown that referenced this issue Jun 23, 2020
This moves the distinction between triple-quoted code spans and actual code
fences from the parse_codefence to the is_codefence function.  Where the old
code was checking for at least three occurrences of the fence character,
this one here only checks for one, assuming that no language specification
will ever contain backticks.

This also removes setting of a hoextdown-specific variable from the previous
commit, to make the combination compile on base hoedown.  Will need to
re-add that assignment when merging with hoextdown.

Fixes hoedown/hoedown#238.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant