Description
Support table data format specifiers (format=csv, format=tsv, format=dsv, [csv], [dsv]) and external delimited data loading in table blocks.
Specification Reference
Proposed Changes
- Tests (TDD):
- Add unit tests in
tests/test_blocks_parsing.py and tests/test_tables.py.
- Add local TCK fixtures under
tests/tck_harness/tests/block/table/.
- Implementation:
- In
src/asciidoctrine/transformers/block_transformer.py, detect data format attribute on tables and parse delimited cell lines into TableRow and TableCell AST nodes using Python's csv module / delimiter parser.
- Update
docutils_backend.py to render formatted data tables.
Description
Support table data format specifiers (
format=csv,format=tsv,format=dsv,[csv],[dsv]) and external delimited data loading in table blocks.Specification Reference
[format=csv,options=header]or[%header,csv]with comma/tab/colon delimited content.include::data.csv[]inside table blocks.Proposed Changes
tests/test_blocks_parsing.pyandtests/test_tables.py.tests/tck_harness/tests/block/table/.src/asciidoctrine/transformers/block_transformer.py, detect data format attribute on tables and parse delimited cell lines intoTableRowandTableCellAST nodes using Python'scsvmodule / delimiter parser.docutils_backend.pyto render formatted data tables.