feat: Added better md styling
All checks were successful
Build and Push App Image / build-and-push (push) Successful in 58s

This commit is contained in:
domrichardson
2026-03-26 11:41:16 +00:00
parent 94f11be77c
commit cf94697d07
7 changed files with 112 additions and 7 deletions

View File

@@ -31,7 +31,7 @@
<div :class="showFileExplorer ? 'col-12 col-md-4 mt-3 mt-md-0' : 'col-12 col-md-6 mt-3 mt-md-0'">
<div class="preview-pane border rounded p-3">
<div v-html="renderedMarkdown"></div>
<div class="markdown-body" v-html="renderedMarkdown"></div>
</div>
</div>
@@ -96,10 +96,9 @@
<script setup>
import { ref, computed, watch, onBeforeUnmount, onMounted, nextTick } from "vue";
import { marked } from "marked";
import DOMPurify from "dompurify";
import { useSettingsStore } from "../stores/settingsStore";
import { preprocessMarkdown } from "../utils/markdown.js";
import { renderMarkdown } from "../utils/markdown.js";
import FileExplorer from "./FileExplorer.vue";
const props = defineProps({
@@ -138,7 +137,7 @@ const saveState = ref("saved");
const saveStateTimeout = ref(null);
const renderedMarkdown = computed(() => {
const html = marked.parse(preprocessMarkdown(editingNote.value.content || ""));
const html = renderMarkdown(editingNote.value.content || "");
return DOMPurify.sanitize(html);
});