@delt/claude-alarm 0.6.17 → 0.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/index.html +13 -1
- package/package.json +1 -1
- package/src/dashboard/index.html +13 -1
|
@@ -1201,7 +1201,7 @@
|
|
|
1201
1201
|
}
|
|
1202
1202
|
return `<div class="notif-item" data-session="${n.sessionId}" data-index="${i}">
|
|
1203
1203
|
<div class="notif-title"><span class="notif-level ${n.level}"></span><span class="notif-title-text">${esc(n.title)}</span><button class="notif-dismiss" data-index="${i}">×</button></div>
|
|
1204
|
-
<div class="notif-message">${
|
|
1204
|
+
<div class="notif-message">${esc(stripMarkdown(n.message))}</div>${permButtons}
|
|
1205
1205
|
<div class="notif-time">${sName} · ${timeStr}</div>
|
|
1206
1206
|
</div>`;
|
|
1207
1207
|
}).join('');
|
|
@@ -1354,6 +1354,18 @@
|
|
|
1354
1354
|
return d.innerHTML;
|
|
1355
1355
|
}
|
|
1356
1356
|
|
|
1357
|
+
function stripMarkdown(s) {
|
|
1358
|
+
return s
|
|
1359
|
+
.replace(/```[\s\S]*?```/g, '') // code blocks
|
|
1360
|
+
.replace(/`([^`]+)`/g, '$1') // inline code
|
|
1361
|
+
.replace(/\*\*(.+?)\*\*/g, '$1') // bold
|
|
1362
|
+
.replace(/\*(.+?)\*/g, '$1') // italic
|
|
1363
|
+
.replace(/^#{1,3}\s+/gm, '') // headings
|
|
1364
|
+
.replace(/^- /gm, '· ') // list items
|
|
1365
|
+
.replace(/\n{2,}/g, '\n') // multiple newlines
|
|
1366
|
+
.trim();
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1357
1369
|
function renderMarkdown(text) {
|
|
1358
1370
|
let html = esc(text);
|
|
1359
1371
|
html = html.replace(/```(\w*)\n?([\s\S]*?)```/g, '<pre><code>$2</code></pre>');
|
package/package.json
CHANGED
package/src/dashboard/index.html
CHANGED
|
@@ -1201,7 +1201,7 @@
|
|
|
1201
1201
|
}
|
|
1202
1202
|
return `<div class="notif-item" data-session="${n.sessionId}" data-index="${i}">
|
|
1203
1203
|
<div class="notif-title"><span class="notif-level ${n.level}"></span><span class="notif-title-text">${esc(n.title)}</span><button class="notif-dismiss" data-index="${i}">×</button></div>
|
|
1204
|
-
<div class="notif-message">${
|
|
1204
|
+
<div class="notif-message">${esc(stripMarkdown(n.message))}</div>${permButtons}
|
|
1205
1205
|
<div class="notif-time">${sName} · ${timeStr}</div>
|
|
1206
1206
|
</div>`;
|
|
1207
1207
|
}).join('');
|
|
@@ -1354,6 +1354,18 @@
|
|
|
1354
1354
|
return d.innerHTML;
|
|
1355
1355
|
}
|
|
1356
1356
|
|
|
1357
|
+
function stripMarkdown(s) {
|
|
1358
|
+
return s
|
|
1359
|
+
.replace(/```[\s\S]*?```/g, '') // code blocks
|
|
1360
|
+
.replace(/`([^`]+)`/g, '$1') // inline code
|
|
1361
|
+
.replace(/\*\*(.+?)\*\*/g, '$1') // bold
|
|
1362
|
+
.replace(/\*(.+?)\*/g, '$1') // italic
|
|
1363
|
+
.replace(/^#{1,3}\s+/gm, '') // headings
|
|
1364
|
+
.replace(/^- /gm, '· ') // list items
|
|
1365
|
+
.replace(/\n{2,}/g, '\n') // multiple newlines
|
|
1366
|
+
.trim();
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1357
1369
|
function renderMarkdown(text) {
|
|
1358
1370
|
let html = esc(text);
|
|
1359
1371
|
html = html.replace(/```(\w*)\n?([\s\S]*?)```/g, '<pre><code>$2</code></pre>');
|