acdc-parser 0.1.4

`AsciiDoc` parser using PEG grammars
Documentation

acdc-parser

The implementation here follows from:

Features supported

  • Document Headers
  • Section
  • Delimited Block
    • Comment
    • Example
    • Listing
    • Literal
    • Open
    • Sidebar
    • Table
    • Pass
    • Quote
    • Verse
  • Paragraph
    • Bold (constrained & unconstrained)
    • Italic (constrained & unconstrained)
    • Monospace (constrained & unconstrained)
    • Literal Monospace
    • Highlight (constrained & unconstrained)
    • Subscript / Superscript
    • Curved quotes and apostrophes
    • Passthrough (inline and macro)
  • Image (block and inline)
  • Video
  • Audio
  • Lists (see detailed notes)
    • Ordered
    • Unordered
    • Description Lists
    • Checklist items
  • Thematic Break
  • Page Break
  • Tables (basic support)
  • Admonition
  • Anchors
  • Attributes
  • Titles
  • Footnotes (including inline content)
  • Cross References
    • xref macro
    • Shorthand notation (<<id>>)
  • Links and URLs
    • Link macro
    • URL detection and autolinks
  • Inline Macros
    • Button
    • Keyboard
    • Menu
    • Icon
    • Pass
  • Includes
    • Advanced
    • Offsets
    • Tagged regions
  • Conditionals
    • ifdef
    • ifndef
    • ifeval
  • Line breaks (+)
  • Discrete headers

Lists - detailed support notes

Lists are partially implemented. Here's what works and what doesn't.

What works

Ordered and unordered lists

Basic list items with inline content work fine, including:

  • Nested lists (using different marker levels like *, **, ***)
  • Checklist items ([x], [ ])
  • Multiline text that wraps within a list item
  • List separators (both // line comments and [] block attributes)
  • Multiple consecutive + continuations in the same item
  • Open block (--) wrappers for grouping multiple blocks in a continuation

Description lists

I've implemented basic description list support with several features:

  • All standard delimiters (::, :::, ::::, ;;)
  • Principal text (inline text immediately after the delimiter)
  • Explicit continuation (+) for attaching block content
  • Auto-attaching ordered/unordered lists to description list items (even with blank lines before the list)

What doesn't work

Ancestor list continuation

  • No ancestor list continuation (attaching blocks to parent list items with blank lines before +)

Why these limitations exist

The model supports block attachments (ListItem has both principal: Vec<InlineNode> and blocks: Vec<Block>), and most list features work correctly. The remaining issue is:

  • Ancestor list continuation (blank line before +) isn't supported - the parser attaches continuations to the last nested item rather than the parent