feat: add md command links#9
Merged
Merged
Conversation
Deploying with
|
| 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 |
There was a problem hiding this comment.
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-linkclass 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.