diff --git a/js/contraband.js b/js/contraband.js
index 1c62a6f..62ceee9 100644
--- a/js/contraband.js
+++ b/js/contraband.js
@@ -17,6 +17,21 @@
return d.innerHTML;
}
+ // Mini markdown → HTML (escape first, then convert patterns)
+ function md(s) {
+ if (!s) return '';
+ let h = esc(s);
+ // Links: [text](url)
+ h = h.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1');
+ // Bold: **text**
+ h = h.replace(/\*\*([^*]+)\*\*/g, '$1');
+ // Italic: *text*
+ h = h.replace(/\*([^*]+)\*/g, '$1');
+ // Inline code: `text`
+ h = h.replace(/`([^`]+)`/g, '$1');
+ return h;
+ }
+
function fmt(n) {
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
@@ -148,11 +163,11 @@
if (entry.url) {
html += `