Skip to content

Commit a77f1db

Browse files
committed
Add table support
- Tables support cell customization (including colors) - Add handy alias for pages to define the contentWidth and contentHeight
1 parent 5f47c6b commit a77f1db

26 files changed

+2102
-26
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Fix precision rounding issues in LineWrapper
66
- Add support for dynamic sizing
7+
- Add table generation
78

89
### [v0.16.0] - 2024-12-29
910

docs/generate.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ class Node {
237237
// loop through subnodes and render them
238238
for (let index = 0; index < this.content.length; index++) {
239239
const fragment = this.content[index];
240+
241+
if (this.type === "numberlist") {
242+
let node = new Node(["inlinecode", `${index + 1}. `]);
243+
fragment.content.splice(0, 0, node);
244+
}
245+
240246
if (fragment.type === 'text') {
241247
// add a new page for each heading, unless it follows another heading
242248
if (
@@ -339,5 +345,6 @@ render(doc, 'forms.md');
339345
render(doc, 'destinations.md');
340346
render(doc, 'attachments.md');
341347
render(doc, 'accessibility.md');
348+
render(doc, 'table.md');
342349
render(doc, 'you_made_it.md');
343350
doc.end();

docs/generate_website.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const files = [
2424
'destinations.md',
2525
'attachments.md',
2626
'accessibility.md',
27+
'table.md',
2728
'you_made_it.md'
2829
];
2930

0 commit comments

Comments
 (0)