Add markdown-to-pdf extension#26550
Conversation
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile SummaryThis PR adds a new Confidence Score: 5/5Safe to merge; both findings are P2 visual/UX issues that do not affect core functionality. All remaining findings are P2: extensions/markdown-to-pdf/src/lib/markdown.ts —
|
| Filename | Overview |
|---|---|
| extensions/markdown-to-pdf/src/lib/markdown.ts | Configures markdown-it with html: true, but the PDF renderer has no HTML token handler — raw HTML in markdown is silently dropped from output. |
| extensions/markdown-to-pdf/src/lib/pdf/render.ts | Custom PDF rendering engine; table top-border is not redrawn when a page break occurs mid-table, leaving an incomplete frame on the continuation page. |
| extensions/markdown-to-pdf/src/lib/pdf/markdown-model.ts | Markdown token parser that maps markdown-it output to typed PdfBlock structs; logic is sound and well-structured. |
| extensions/markdown-to-pdf/src/lib/normalization.ts | Input normalization and validation; uses a require() workaround for Raycast preferences (flagged in prior review threads). |
| extensions/markdown-to-pdf/src/lib/conversion.ts | Orchestrates content validation, layout normalization, directory creation, and PDF rendering; straightforward and correct. |
| extensions/markdown-to-pdf/src/tools/convert-markdown-to-doc.ts | Raycast AI tool entry point with confirmation dialog; well-typed and correctly structured. |
| extensions/markdown-to-pdf/package.json | Extension manifest with correct categories, Title Case preference labels, textfield types throughout, and all dependencies used. |
Prompt To Fix All With AI
This is a comment left during a code review.
Path: extensions/markdown-to-pdf/src/lib/markdown.ts
Line: 3-7
Comment:
**HTML blocks silently dropped from PDF output**
`html: true` tells markdown-it to parse raw HTML tags in the markdown source, producing `html_block` and `html_inline` tokens. However, `parseMarkdownBlocks` in `markdown-model.ts` does not handle those token types, so any inline HTML the user includes (`<span>`, `<div>`, `<table>`, etc.) will be silently swallowed — no text reaches the PDF.
If HTML embedding is intentionally unsupported, set `html: false` so markdown-it treats `<…>` as literal text instead of silently discarding it:
```suggestion
export const markdown = new MarkdownIt({
html: false,
linkify: true,
breaks: false,
});
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/markdown-to-pdf/src/lib/pdf/render.ts
Line: 392-395
Comment:
**Missing top border when table spans a page break**
`ensureVerticalSpace` can insert a new page in the middle of the table loop. The top border (`rowIndex === 0` guard) is never re-drawn on the new page, so the continuation of the table starts without a top edge, leaving a visually incomplete table frame.
Consider tracking whether the current row is the first on its page and drawing the top border whenever a new page starts mid-table.
How can I resolve this? If you propose a fix, please make it concise.Reviews (2): Last reviewed commit: "Address Greptile review feedback" | Re-trigger Greptile
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
Still active — all review feedback has been addressed in df33c7c. |
|
Tip: Greploop — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
| "mode": "no-view" | ||
| } | ||
| ], | ||
| "tools": [ |
There was a problem hiding this comment.
issue: missing ai evals
Reference:
0xdhrv
left a comment
There was a problem hiding this comment.
Hey @shaynelarocque 👋
I have added a few comments for you to address.
I'm looking forward to testing this extension again 🔥
Feel free to contact me here or at Slack if you have any questions.
I converted this PR into a draft until it's ready for the review, please press the button Ready for review when it's ready and we'll have a look 😊
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
Description
An AI-tool extension that converts markdown into styled PDFs. Mention @markdown to PDF in Ask AI, AI Chat, or AI Commands with your markdown content.
Features:
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder