Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add code highlighter #12

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"@std/front-matter": "jsr:@std/front-matter@^1.0.5",
"@std/path": "jsr:@std/path@^1.0.8",
"@std/yaml": "jsr:@std/yaml@^1.0.5",
"md4w": "npm:md4w@^0.2.6"
"md4w": "npm:md4w@^0.2.6",
"node-html-parser": "npm:node-html-parser@^7.0.1",
"shiki": "npm:shiki@^1.26.1"
},
"exclude": [".gitattributes", ".github", "src/testdata", "**/*/*_test.ts"]
}
324 changes: 322 additions & 2 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/md-to-pdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function mdToPdf(

const browser = await launch();
const page = await browser.newPage(`http://localhost:${server.addr.port}`);
const pdf = await page.pdf();
const pdf = await page.pdf({ printBackground: true });

// Close the browser and the server
await browser.close();
Expand Down
Loading