dont display extra example in directives

This commit is contained in:
Johannes Kirschbauer 2024-03-07 16:17:12 +01:00 committed by Johannes Kirschbauer
parent 31f72d02ba
commit fb2aa93e39
3 changed files with 3 additions and 5 deletions

View File

@ -17,7 +17,6 @@ export function styleDirectives() {
node.type === "textDirective"
) {
if (node.name !== "note") return;
// console.log({ node });
const data = node.data || (node.data = {});
const tagName = node.type === "textDirective" ? "span" : "div";

View File

@ -42,7 +42,7 @@ table th{
padding: 10px 15px; /* Top and bottom padding of 10px, left and right padding of 15px */
margin: 15px 0; /* Vertical margins to separate the note from surrounding content */
font-style: italic; /* Italic font style to indicate note text */
color: #333; /* Dark grey color for the text for readability */
/* color: #333; Dark grey color for the text for readability */
font-family: Arial, sans-serif; /* A clean, readable font */
border-radius: 4px; /* Slightly rounded corners for a modern look */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
@ -51,7 +51,7 @@ table th{
@media (prefers-color-scheme: dark) {
.caution, .important, .note, .tip, .warning, .example {
background-color: #2c2c2c; /* Darker background for dark mode */
color: #ccc; /* Lighter text color for readability */
/* color: #ccc; Lighter text color for readability */
box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1); /* Lighter shadow for depth */
}
}
@ -79,7 +79,7 @@ table th{
}
.example::before{
content: "Example";
/* content: "Example"; */
color: #17a2b8;
}
.example {

View File

@ -148,7 +148,6 @@ export const parseMd = async (src: string) => {
.use(rehypeStringify)
.process(sanitizeDirectives(src));
// console.log({ result });
return result;
};