File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,16 @@ export async function changelogRenderer(mdRepoInfo: MarkdownRepoInfo) {
2020 const shiki = await getShikiHighlighter ( )
2121
2222 renderer . link = function ( { href, title, tokens } : Tokens . Link ) {
23+ const eTitle = escapeHtml ( title ?? '' )
2324 const text = this . parser . parseInline ( tokens )
24- const titleAttr = title ? ` title="${ title } "` : ''
25- const plainText = text . replace ( / < [ ^ > ] * > / g , '' ) . trim ( )
25+ const titleAttr = eTitle ? ` title="${ eTitle } "` : ''
26+ const plainText = escapeHtml ( stripHtmlTags ( text ) . trim ( ) )
2627
2728 if ( href . startsWith ( 'mailto:' ) && ! EMAIL_REGEX . test ( plainText ) ) {
2829 return text
2930 }
3031
31- const intermediateTitleAttr = `data-title-intermediate="${ plainText || title } "`
32+ const intermediateTitleAttr = `data-title-intermediate="${ plainText || eTitle } "`
3233
3334 return `<a href="${ href } "${ titleAttr } ${ intermediateTitleAttr } target="_blank">${ text } </a>`
3435 }
Original file line number Diff line number Diff line change @@ -212,7 +212,6 @@ function getHeadingSlugSource(text: string): string {
212212}
213213
214214/**
215- >>>>>>> main
216215 * Lazy ATX heading extension for marked: allows headings without a space after `#`.
217216 *
218217 * Reimplements the behavior of markdown-it-lazy-headers
You can’t perform that action at this time.
0 commit comments