(profile) allow inline markdown - optimisation, consistency

This commit is contained in:
Andrea Vos 2023-12-09 19:10:01 +01:00
parent 4ed10398e1
commit 16b0004237
2 changed files with 7 additions and 4 deletions

View File

@ -115,7 +115,9 @@
<div class="row">
<div v-for="column in profile.words" v-if="column.values.length" class="col-6 col-lg-3">
<h4 v-if="column.header" class="h6">{{ column.header }}</h4>
<h4 v-if="column.header" class="h6">
<Spelling :text="column.header" markdown/>
</h4>
<ExpandableList :values="column.values" :limit="16" class="list-unstyled" :static="static" :expand="expandLinks">
<template v-slot="s">

View File

@ -3,12 +3,13 @@ import sub from "markdown-it-sub";
import sup from "markdown-it-sup";
import mark from "markdown-it-mark";
export const safeInlineMarkdown = (text) => markdownit('zero')
const md = markdownit('zero')
.enable([
'emphasis', 'strikethrough', 'backticks',
'escape', 'entity',
])
.use(sub)
.use(sup)
.use(mark)
.renderInline(text);
.use(mark);
export const safeInlineMarkdown = (text) => md.renderInline(text);