mirror of
https://github.com/directus/directus.git
synced 2026-01-30 07:58:15 -05:00
Merge pull request #455 from directus/Nitwel-patch-1
match <p></p> when inserting hint
This commit is contained in:
@@ -23,12 +23,10 @@ export default defineComponent({
|
||||
html.value = '';
|
||||
return;
|
||||
}
|
||||
|
||||
let htmlString = marked(slots.default()[0].text!, {
|
||||
highlight: (code) => highlight.highlightAuto(code).value,
|
||||
});
|
||||
|
||||
const hintRegex = /:::(.*?) (.*?)\n((\s|.)*?):::/gm;
|
||||
|
||||
let htmlString = slots.default()[0].text!
|
||||
|
||||
const hintRegex = /:::(.*?) (.*?)\r?\n((\s|.)*?):::/gm;
|
||||
|
||||
htmlString = htmlString.replaceAll(
|
||||
hintRegex,
|
||||
@@ -37,6 +35,10 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
|
||||
let htmlString = marked(htmlString, {
|
||||
highlight: (code) => highlight.highlightAuto(code).value,
|
||||
});
|
||||
|
||||
html.value = htmlString;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user