I cannot figure out how to create a table in an extension. Does anyone have any pointers for how to do this?
I want to create a block macro extension that automatically creates an Asciidoctor table in the AST, and it should work with both the html, docbook and pdf output (through Asciidoctor-pdf).
I have been able to create small text fragments and other items, but not tables.
If you reply to this email, your message will be added to the discussion below:
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
class FooBarMacro < Asciidoctor::Extensions::BlockMacroProcessor
def process parent, target, attrs
tab = ['[width="15%"]',
'|1 |2 |A',
'|3 |4 |B',
'|5 |6 |C',
block = create_open_block parent, '', attrs
parse_content block, tab, attrs