feat: add icons, better suited than emojis
This commit is contained in:
10
src/utils/markdown/markdown-it-tabler-icons.ts
Normal file
10
src/utils/markdown/markdown-it-tabler-icons.ts
Normal 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>`
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user