File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
quartz/components/scripts Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ function renderMermaidInSlide() {
6464 } )
6565}
6666
67+ function anchorBlank ( html : string ) : string {
68+ return html . replace ( / < a \b ( [ ^ > ] * ?) > / g, '<a $1 target="_blank">' )
69+ }
6770
6871function unwrapSlideNote ( html : string ) : string {
6972 return html . replace ( / < p > ( \? { 3 } [ \s \S ] * ?) < \/ p > / g, ( _ , content ) => content )
@@ -106,7 +109,15 @@ function appendRemark(option: SlideOptions) {
106109 }
107110
108111 const body = document . querySelector ( ".center article" ) ?. innerHTML
109- const data = unwrapSlideNote ( unwrapFootnotesSection ( collapseSeparators ( injectSeparators ( header + tags + body ) ) ) )
112+ const data = anchorBlank (
113+ unwrapSlideNote (
114+ unwrapFootnotesSection (
115+ collapseSeparators (
116+ injectSeparators ( header + tags + body )
117+ )
118+ )
119+ )
120+ )
110121 document . body . innerHTML = ""
111122
112123 const script = document . createElement ( "script" )
You can’t perform that action at this time.
0 commit comments