acdc-parser 0.1.1

`AsciiDoc` parser using PEG grammars
Documentation
acdc-parser-0.1.1 has been yanked.

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 (partial support)
    • 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

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

Multiple list continuations

Single + continuation now works for attaching blocks to list items:

* List item text
+
----
Block content here
----
* Next item (stays in same list)

However, multiple consecutive + continuations in the same item don't work correctly yet:

* Item
+
Paragraph 1
+
Paragraph 2   <-- This doesn't attach properly

List separators

The spec describes two ways to force separate lists:

  1. Line comment separator (//)
  2. Block attribute separator ([])

I don't support either. Lists with the same marker will always join together.

Description list limitations

While basic description lists work, there are gaps:

  • No support for the experimental [ordered] and [unordered] attributes (described here)
  • No .stack role support for formatting

Other missing list features

  • No support for {empty} to drop principal text
  • No open block (--) wrapper support for grouping multiple blocks
  • No ancestor list continuation (attaching blocks to parent list items with blank lines before +)

Why these limitations exist

The model now supports block attachments (ListItem has both principal: Vec<InlineNode> and blocks: Vec<Block>), and single + continuations work. The remaining issues are parser grammar limitations:

  1. Multiple consecutive + markers in the same item aren't parsed correctly
  2. List separators (// and []) aren't recognized
  3. Ancestor list continuation (blank line before +) isn't supported