mirror of
https://github.com/directus/directus.git
synced 2026-01-30 00:37:55 -05:00
Merge pull request #460 from directus/fix-docs
fix markdown in tips not rendering
This commit is contained in:
@@ -25,9 +25,12 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
let htmlString = slots.default()[0].text!;
|
||||
|
||||
const hintRegex = /:::(.*?) (.*?)\r?\n((\s|.)*?):::/gm;
|
||||
|
||||
htmlString = marked(htmlString, {
|
||||
highlight: (code) => highlight.highlightAuto(code).value,
|
||||
});
|
||||
|
||||
htmlString = htmlString.replaceAll(
|
||||
hintRegex,
|
||||
(match: string, type: string, title: string, body: string) => {
|
||||
@@ -35,10 +38,6 @@ export default defineComponent({
|
||||
}
|
||||
);
|
||||
|
||||
htmlString = marked(htmlString, {
|
||||
highlight: (code) => highlight.highlightAuto(code).value,
|
||||
});
|
||||
|
||||
html.value = htmlString;
|
||||
}
|
||||
},
|
||||
@@ -71,8 +70,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1,
|
||||
@@ -103,9 +102,9 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: 0px;
|
||||
font-size: 19px;
|
||||
line-height: 24px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
@@ -135,11 +134,11 @@ export default defineComponent({
|
||||
tt {
|
||||
margin: 0 2px;
|
||||
padding: 0 5px;
|
||||
font-family: var(--family-monospace);
|
||||
white-space: nowrap;
|
||||
background-color: var(--background-page);
|
||||
border: 1px solid var(--background-normal);
|
||||
border-radius: var(--border-radius);
|
||||
font-family: var(--family-monospace);
|
||||
}
|
||||
|
||||
pre code {
|
||||
|
||||
Reference in New Issue
Block a user