Skip to content

Commit

Permalink
feat: add code highlighter (#12)
Browse files Browse the repository at this point in the history
* feat: add code highlighter

* feat: add simple default css
  • Loading branch information
ryuapp authored Jan 12, 2025
1 parent abff63b commit 63c8e2d
Show file tree
Hide file tree
Showing 6 changed files with 428 additions and 10 deletions.
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

0 comments on commit 63c8e2d

Please sign in to comment.