-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Problem
Table cell spanning syntax is not implemented. AsciiDoc supports colspan and rowspan via special syntax in table cells.
AsciiDoc syntax
[cols="3*"]
|===
| Cell 1 | Cell 2 | Cell 3
2+| Spans 2 columns | Cell 6
.2+| Spans 2 rows
| Cell 8
| Cell 9
| Cell 10
| Cell 11
|===2+|= colspan of 2.2+|= rowspan of 22.3+|= colspan of 2, rowspan of 3
Current behavior
Spanning syntax is treated as literal content or causes parsing issues.
Implementation requirements
1. AST changes (acdc-parser/src/model/tables.rs)
Add span fields to TableColumn:
pub struct TableColumn {
pub content: Vec<Block>,
pub colspan: usize, // NEW: default 1
pub rowspan: usize, // NEW: default 1
}2. Parser changes (acdc-parser/src/grammar/)
- Parse span prefixes before cell content:
(\d+)?(\.\d+)?\+ - Validate spans don't exceed table boundaries
- Handle interaction with column specifiers
3. HTML renderer (converters/html/src/table.rs)
- Emit
colspanandrowspanattributes on<td>/<th>elements - Skip cells that are "covered" by a spanning cell from a previous row
Workaround
Use separate rows/columns instead of spanning.
Priority
High - affects complex table layouts, common use case.
References
Metadata
Metadata
Assignees
Labels
No labels