Skip to content

Commit

Permalink
Add table support
Browse files Browse the repository at this point in the history
- Tables support cell customization (including colors)
- Add handy alias for pages to define the contentWidth and contentHeight
  • Loading branch information
hollandjake committed Jan 12, 2025
1 parent 5f47c6b commit a77f1db
Show file tree
Hide file tree
Showing 26 changed files with 2,102 additions and 26 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Fix precision rounding issues in LineWrapper
- Add support for dynamic sizing
- Add table generation

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

Expand Down
7 changes: 7 additions & 0 deletions docs/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ class Node {
// loop through subnodes and render them
for (let index = 0; index < this.content.length; index++) {
const fragment = this.content[index];

if (this.type === "numberlist") {
let node = new Node(["inlinecode", `${index + 1}. `]);
fragment.content.splice(0, 0, node);
}

if (fragment.type === 'text') {
// add a new page for each heading, unless it follows another heading
if (
Expand Down Expand Up @@ -339,5 +345,6 @@ render(doc, 'forms.md');
render(doc, 'destinations.md');
render(doc, 'attachments.md');
render(doc, 'accessibility.md');
render(doc, 'table.md');
render(doc, 'you_made_it.md');
doc.end();
1 change: 1 addition & 0 deletions docs/generate_website.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const files = [
'destinations.md',
'attachments.md',
'accessibility.md',
'table.md',
'you_made_it.md'
];

Expand Down
Loading

0 comments on commit a77f1db

Please sign in to comment.