Skip to content

fix: parse code, callouts and list items in the HTML regex fallback - #13

Merged
zerochae merged 1 commit into
masterfrom
fix/html-fallback-elements
Jul 21, 2026
Merged

fix: parse code, callouts and list items in the HTML regex fallback#13
zerochae merged 1 commit into
masterfrom
fix/html-fallback-elements

Conversation

@zerochae

Copy link
Copy Markdown
Owner

Summary

When the treesitter HTML parser isn't installed, the regex fallback handled only headings/links/images/summaries/definitions (and, since the previous fix,
tables). This extends it to <pre> (code), <blockquote> (callout) and <li> (bullet), closing the gap with the treesitter path.

Details

  • html_utils.list_items() extracts inline <li> text.
  • html.lua regex(): <pre> and <blockquote> are consumed as multiline blocks (label "code" / flattened text), <li> is inline. Single-line
    <blockquote>…</blockquote> closes on its own line (scan starts at line i, not i+1).
  • Updated the doc/toc.txt integrations note to reflect the fuller fallback.

Testing

  • make check: stylua clean + tests pass (adds a pre/blockquote/li fallback case, calling regex() directly so it runs with or without treesitter).

@zerochae zerochae self-assigned this Jul 21, 2026
@zerochae
zerochae merged commit 2157a09 into master Jul 21, 2026
3 checks passed
@zerochae
zerochae deleted the fix/html-fallback-elements branch July 23, 2026 02:47
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.

1 participant