File tree Expand file tree Collapse file tree 4 files changed +140
-3
lines changed
routes/[pullOrIssue=poi]/[org]/[repo]/[id=number] Expand file tree Collapse file tree 4 files changed +140
-3
lines changed Original file line number Diff line number Diff line change 3636 "prettier" : " ^3.3.3" ,
3737 "prettier-plugin-svelte" : " ^3.2.6" ,
3838 "prettier-plugin-tailwindcss" : " ^0.6.6" ,
39+ "rehype-raw" : " ^7.0.0" ,
3940 "semver" : " ^7.6.3" ,
4041 "shiki" : " ^1.14.1" ,
4142 "svelte" : " ^4.2.19" ,
Original file line number Diff line number Diff line change 77 */
88 import Markdown , { type Plugin } from " svelte-exmarkdown" ;
99 import { gfmPlugin } from " svelte-exmarkdown/gfm" ;
10+ import rehypeRaw from " rehype-raw" ;
1011 import { cn } from " $lib/utils" ;
1112
1213 export let markdown: string ;
1314 export let inline = false ;
15+ export let parseRawHtml = false ;
1416 export let additionalPlugins: Plugin [] = [];
1517
1618 let className: string | undefined | null = undefined ;
2628 className
2729 )}
2830>
29- <Markdown md ={markdown } plugins ={[gfmPlugin (), ... additionalPlugins ]} />
31+ <Markdown
32+ md ={markdown }
33+ plugins ={[
34+ gfmPlugin (),
35+ ... (parseRawHtml ? [{ rehypePlugin: rehypeRaw }] : []),
36+ ... additionalPlugins
37+ ]}
38+ />
3039</span >
Original file line number Diff line number Diff line change 145145 </Accordion .Trigger >
146146 <!-- Body -->
147147 <Accordion .Content class =" mx-auto sm:w-3/4" >
148- <MarkdownRenderer markdown ={entity .body } class =" max-w-full text-base" />
148+ <MarkdownRenderer markdown ={entity .body } parseRawHtml class =" max-w-full text-base" />
149149 </Accordion .Content >
150150 </Accordion .Item >
151151 {/each }
206206 {:then highlighter }
207207 <MarkdownRenderer
208208 markdown ={info .body || " _No description provided_" }
209+ parseRawHtml
209210 class =" max-w-full"
210211 additionalPlugins ={[
211212 { renderer: { p: BodyRenderer } },
272273 </div >
273274 <!-- Body -->
274275 <div class =" p-4" >
275- <MarkdownRenderer markdown ={comment .body || " _Empty comment_" } class =" w-full" />
276+ <MarkdownRenderer
277+ markdown ={comment .body || " _Empty comment_" }
278+ parseRawHtml
279+ class =" w-full"
280+ />
276281 </div >
277282 </div >
278283 {/each }
You can’t perform that action at this time.
0 commit comments