asciidoctor-vscode
asciidoctor-vscode copied to clipboard
Add code folding on tables
trafficstars
It would be nice to add code folding for tables. This way if you have something like:
// Without a header row
[cols="1,1"]
|===
|Cell in column 1, row 1
|Cell in column 2, row 1
|Cell in column 1, row 2
|Cell in column 2, row 2
|Cell in column 1, row 3
|Cell in column 2, row 3
|===
// With a header row
[cols="1,1"]
|===
|Cell in column 1, header row |Cell in column 2, header row
|Cell in column 1, row 2
|Cell in column 2, row 2
|Cell in column 1, row 3
|Cell in column 2, row 3
|Cell in column 1, row 4
|Cell in column 2, row 4
|===
You could fold it to:
// Without a header row
[cols="1,1"]
|===…
// With a header row (keeping headings)
[cols="1,1"]
|===
|Cell in column 1, header row |Cell in column 2, header row…
// With a header row (alternative without headings)
[cols="1,1"]
|===…
Note: dots are added by VSCode on folding
Documentation: https://docs.asciidoctor.org/asciidoc/latest/tables/build-a-basic-table/
Comparison
In Markdown…
a|b
---|---
c|d
…folds to
a|b…
Keeping only the headings