File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 "@tauri-apps/plugin-dialog" : " ^2.6" ,
3131 "dompurify" : " ^3.3" ,
3232 "marked" : " ^17.0" ,
33+ "marked-alert" : " ^2.1" ,
3334 "marked-base-url" : " ^1.1" ,
3435 "phosphor-svelte" : " ^2.0"
3536 }
Original file line number Diff line number Diff line change @@ -61,3 +61,50 @@ select {
6161.plugin-readme img {
6262 @apply my-3;
6363}
64+
65+ .plugin-readme .octicon {
66+ display : inline-block;
67+ fill : currentColor;
68+ vertical-align : text-bottom;
69+ }
70+ .plugin-readme .markdown-alert {
71+ padding : 0 1em ;
72+ margin-bottom : 16px ;
73+ color : inherit;
74+ border-left : 0.25em solid # 444c56 ;
75+ }
76+ .plugin-readme .markdown-alert-title {
77+ display : inline-flex;
78+ align-items : center;
79+ font-weight : 500 ;
80+ }
81+ .plugin-readme .markdown-alert-note {
82+ border-left-color : # 539bf5 ;
83+ }
84+ .plugin-readme .markdown-alert-tip {
85+ border-left-color : # 57ab5a ;
86+ }
87+ .plugin-readme .markdown-alert-important {
88+ border-left-color : # 986ee2 ;
89+ }
90+ .plugin-readme .markdown-alert-warning {
91+ border-left-color : # c69026 ;
92+ }
93+ .plugin-readme .markdown-alert-caution {
94+ border-left-color : # e5534b ;
95+ }
96+ .plugin-readme .markdown-alert-note > .markdown-alert-title {
97+ color : # 539bf5 ;
98+ }
99+ .plugin-readme .markdown-alert-tip > .markdown-alert-title {
100+ color : # 57ab5a ;
101+ }
102+ .plugin-readme .markdown-alert-important > .markdown-alert-title {
103+ color : # 986ee2 ;
104+ }
105+ .plugin-readme .markdown-alert-warning > .markdown-alert-title {
106+ color : # c69026 ;
107+ }
108+ .plugin-readme .markdown-alert-caution > .markdown-alert-title {
109+ color : # e5534b ;
110+ }
Original file line number Diff line number Diff line change 88 import { invoke } from " @tauri-apps/api/core" ;
99 import DOMPurify from " dompurify" ;
1010 import { marked } from " marked" ;
11+ import markedAlert from " marked-alert" ;
1112 import { baseUrl } from " marked-base-url" ;
1213 import { onMount } from " svelte" ;
1314
3839 for (const url of urls ) {
3940 const response = await fetch (url );
4041 if (response .ok ) {
42+ marked .use (markedAlert ());
4143 marked .use (baseUrl (url ));
4244 return await marked .parse (DOMPurify .sanitize (await response .text ()).replace (/ <a/ g , ' <a target="_blank" ' ));
4345 }
You can’t perform that action at this time.
0 commit comments