Skip to content

Commit

Permalink
fix: 修正jsdoc注释显示错误
Browse files Browse the repository at this point in the history
  • Loading branch information
sj817 committed Sep 16, 2024
1 parent 92217c6 commit 2e48729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default class Markdown {
const highlighted = hljs.highlight(code, { language, ignoreIllegals: true }).value

const lines = highlighted.split('\n').map((line, i) => {
return `<span class="hljs-line" data-line-number="${i + 1}">${line}</span>`
return `<div class="hljs-line" data-line-number="${i + 1}">${line}</div>`
}).join('\n')

return `<pre><code class="hljs ${language}">${lines}</code></pre>`
Expand Down

0 comments on commit 2e48729

Please sign in to comment.