fix: slash commands clean /command + cache-bust Forge iframe
Bug 1: selectSlashAction now strips /command text before executing. Bug 2: Forge URL includes _ts=Date.now() to prevent cache.
This commit is contained in:
@@ -784,6 +784,13 @@ body { font-family: var(--sans); background: var(--bg); color: var(--text); heig
|
||||
function getVisibleSlash() { return slashItems.filter(function(i) { return i.style.display !== 'none'; }); }
|
||||
|
||||
function selectSlashAction(action) {
|
||||
// Clean up the /command text from the current line
|
||||
var line = getLine();
|
||||
var m = line.text.match(/^\/\S*\s*/);
|
||||
if (m) {
|
||||
ta.value = val().substring(0, line.start) + val().substring(line.start + m[0].length);
|
||||
setPos(line.start);
|
||||
}
|
||||
hideSlash();
|
||||
// Handle QI-specific actions
|
||||
if (action && action.indexOf('mermaid-') === 0) {
|
||||
|
||||
Reference in New Issue
Block a user