Skip to content

fix list marker detection for items starting with bold#143

Merged
jaredh159 merged 1 commit into
jaredh159:masterfrom
natemcmaster:fix-bold-bullet-list-marker
May 25, 2026
Merged

fix list marker detection for items starting with bold#143
jaredh159 merged 1 commit into
jaredh159:masterfrom
natemcmaster:fix-bold-bullet-list-marker

Conversation

@natemcmaster

Copy link
Copy Markdown
Contributor

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.

* *foo* bar
* **baz** qux
* jim

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 a Star:

Star if second.kind(Whitespace) && third.is_some_and(|t| t.kind != Star) => {

The intent was to keep the markdown-style thematic break * * * from being treated as a list, but the t.kind != Star guard over-rejects: any list item whose first word is *bold* or **strong** also has a Star in third position.

Fix

Narrow the exclusion to the exact * * * thematic-break pattern (mirroring the check in parse_block.rs), so * *bold*, * **strong**, and * * literal are all accepted as list items while * * * still parses as a thematic break.

Added a unit test in line.rs and an HTML rendering test in eval_lists.rs. The existing markdown_thematic_break test still passes.

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

@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.

@jaredh159

Copy link
Copy Markdown
Owner

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.

@natemcmaster

natemcmaster commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

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).

@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
asciidork-playground Ready Ready Preview, Comment May 25, 2026 6:49pm

@jaredh159 jaredh159 merged commit 43f2574 into jaredh159:master May 25, 2026
6 checks passed
@jaredh159

Copy link
Copy Markdown
Owner

thanks so much. sorry for the delay, merging now, will get a release out shortly. 👍

@natemcmaster

Copy link
Copy Markdown
Contributor Author

Awesome, thanks :D

@jaredh159

Copy link
Copy Markdown
Owner

released in v0.38.1

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

Successfully merging this pull request may close these issues.

2 participants