Skip to content

feat: add md command links#9

Merged
devDariush merged 3 commits into
mainfrom
feat/md-command-links
Feb 17, 2026
Merged

feat: add md command links#9
devDariush merged 3 commits into
mainfrom
feat/md-command-links

Conversation

@devDariush

Copy link
Copy Markdown
Owner

No description provided.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
dariushdev-sveltekit cd57ebc Commit Preview URL

Branch Preview URL
Feb 17 2026, 10:21 PM

@devDariush devDariush marked this pull request as ready for review February 17, 2026 22:21
Copilot AI review requested due to automatic review settings February 17, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for cmd:// protocol links in markdown files, enabling clickable inline command execution within terminal output. This allows markdown files (like contact.md) to embed terminal commands that execute when clicked, with progressive enhancement supporting both JavaScript and non-JavaScript environments.

Changes:

  • Implements cmd:// URL scheme for markdown links that execute terminal commands
  • Renders cmd:// links as forms with hidden inputs for progressive enhancement
  • Updates styling with new .terminal-cmd-link class for inline command buttons
  • Adds comprehensive test coverage and documentation for the feature

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
static/contact.md Updates PGP key link from external URL to cmd:// link for inline terminal command
src/routes/layout.css Adds styling for terminal-cmd-link buttons and inline-block forms in markdown
src/lib/components/TerminalOutput.svelte Adds click handler to intercept cmd:// link button clicks and execute commands
src/lib/commands-utils.ts Implements custom marked renderer to convert cmd:// links to form elements
src/lib/commands-utils.test.ts Adds comprehensive test for cmd:// link rendering and decoding
docs/TEST_COVERAGE.md Updates test descriptions and mock notes for new cmd:// feature
docs/TERMINAL_README.md Documents cmd:// markdown links feature with usage examples and security notes
docs/DOCS_INDEX.md Updates test count from 71 to 72 tests

Comment thread src/lib/commands-utils.ts
Comment thread src/lib/commands-utils.ts
Comment thread src/lib/commands-utils.ts
Comment thread src/lib/commands-utils.test.ts
Comment thread src/routes/layout.css
Comment thread docs/TERMINAL_README.md
@devDariush devDariush merged commit 1517ac5 into main Feb 17, 2026
8 checks passed
@devDariush devDariush deleted the feat/md-command-links branch February 17, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants