nsarrazin HF Staff commited on
Commit
3ad7680
·
unverified ·
1 Parent(s): 81ac98c

fix: move the source rendering to post processing

Browse files
src/lib/components/chat/MarkdownRenderer.svelte CHANGED
@@ -163,8 +163,7 @@
163
 
164
  const marked = new Marked({
165
  hooks: {
166
- preprocess: (md) => addInlineCitations(md, sources),
167
- postprocess: (html) => DOMPurify.sanitize(html),
168
  },
169
  extensions: [katexBlockExtension, katexInlineExtension],
170
  renderer: {
 
163
 
164
  const marked = new Marked({
165
  hooks: {
166
+ postprocess: (html) => DOMPurify.sanitize(addInlineCitations(html, sources)),
 
167
  },
168
  extensions: [katexBlockExtension, katexInlineExtension],
169
  renderer: {