refactor: simplify command dispatch and update cmd-link
- Simplify `dispatchCommand` by removing role-based logic and ensuring commands are prefixed with a slash. - Change `:cmd[]` directive output from a `span` to an `a` tag. - Update `.cmd-link` styles to improve link appearance and prevent text selection.
This commit is contained in:
+1
-1
@@ -24,7 +24,7 @@ export const cmdDirective = {
|
||||
|
||||
const label = (token.attrs?.label as string) || command;
|
||||
|
||||
return `<span class="cmd-link" data-cmd="${escapeAttr(command)}" role="button" tabindex="0">${escapeHtml(label)}</span>`;
|
||||
return `<a class="cmd-link" data-cmd="${escapeAttr(command)}">${escapeHtml(label)}</a>`;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user