fix list marker detection for items starting with bold#143
Conversation
|
@natemcmaster is attempting to deploy a commit to the Jared Henderson's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey, thanks for the pull request. I appreciate it. Do you mind giving me just a little bit of background on what you're using Asciidork for and in what context? Is it just personal exploration? Are you using it at work at all? I'm always interested in finding out whether it's useful to people. Also, can you give me a brief AI disclosure? What percentage of this work was done with LLMs? I just like to be aware of what I'm reviewing, I am OK with AI assistance. |
|
Yeah, I'm using it for work. I'm trying to use this library to render a static HTML version from an *.adoc file. I wanted to avoid a Ruby dependency by using the official https://github.com/asciidoctor/asciidoctor library. AI helped me write all of this code, but I reviewed all the lines of it first and it matches what I would have written by hand (if I had to do it the slow way). |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
thanks so much. sorry for the delay, merging now, will get a release out shortly. 👍 |
|
Awesome, thanks :D |
|
released in |
Problem
A bullet list item whose text begins with bold/strong formatting is not recognized as a list item — it falls through and renders as a plain paragraph.
Currently renders as a paragraph containing literal
*characters instead of a<ul>. Asciidoctor renders this as a 3-item unordered list with<strong>inside the first two items.Cause
Line::list_marker()rejects a*marker whenever the token following the trailing whitespace is also aStar:The intent was to keep the markdown-style thematic break
* * *from being treated as a list, but thet.kind != Starguard over-rejects: any list item whose first word is*bold*or**strong**also has aStarin third position.Fix
Narrow the exclusion to the exact
* * *thematic-break pattern (mirroring the check inparse_block.rs), so* *bold*,* **strong**, and* * literalare all accepted as list items while* * *still parses as a thematic break.Added a unit test in
line.rsand an HTML rendering test ineval_lists.rs. The existingmarkdown_thematic_breaktest still passes.