feat: add icons, better suited than emojis

This commit is contained in:
Julien Calixte
2026-03-17 23:43:29 +01:00
parent 514d08946d
commit 944b128894
3 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import { markdownItPlugin } from "./markdown-it-regexp"
// Matches :icon-name: where icon-name is letters, digits, hyphens
export const markdownItTablerIcons = markdownItPlugin(
/:([\w-]+):/,
(match) => {
const name = match[0][1]
return `<i class="ti ti-${name}"></i>`
},
)