mirror of
https://github.com/directus/directus.git
synced 2026-02-03 10:54:55 -05:00
Insert tip before generating html
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 = /<p>:::(.*?) (.*?)\n((\s|.)*?):::<\/p>/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