Skip to content

Conversation

@nlopes
Copy link
Owner

@nlopes nlopes commented Jan 17, 2026

No description provided.

nlopes added 14 commits January 17, 2026 16:03
Tables now properly handle cell-level formatting that was previously
only supported at the column level. This brings parity with asciidoctor
for common table patterns.

Key changes:
- Cell alignment overrides column defaults (^|, >|, .<|, .^|, .>|)
- Cell duplication creates N identical cells (3*| Same)
- Rowspan tracking prevents cell overlap in subsequent rows
Tables now render with proper CSS classes for frame, grid, stripes, width, and custom
roles - matching asciidoctor output.

Also consolidates attribute string extraction into ElementAttributes methods (get_string)
removing duplicate helper functions from icon.rs and table.rs.
Cell positions were off by one column because the calculation used
part boundaries directly instead of accounting for whitespace and
cell specifiers.

The fix calculates actual content offsets by tracking leading whitespace,
specifier length, and post-specifier whitespace before computing positions.
The condition for skipping the first part after splitting was checking
`!is_csv` when it should've been `separator == "|"`. PSV format has an
empty first part (before the leading `|`), but DSV format doesn't - the
first part is actual content.

Also added unit tests for the split_escaped function and fixtures for
both PSV and DSV escape handling.
The csv crate strips quotes and normalizes content, so we need to scan
the raw text to find where fields actually start. Now "Hello\nWorld"
correctly points to line 4:8 (inside the quotes) instead of some
approximated offset that ignored quote characters entirely.

Added proper RFC 4180 handling for escaped quotes too.
It seems counters are not so
hot (https://asciidoc.zulipchat.com/#narrow/channel/335219-asciidoc-lang/topic/counters/near/568691273)
so I've decided to just add a warning if we detect them but not actually do anything with them.
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