Skip to content

Commit

Permalink
修复代码块未高亮的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
2234839 committed Dec 20, 2023
1 parent e2fcfbf commit 5afe505
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions apps/frontend/src/core/render.ts
Expand Up @@ -458,20 +458,14 @@ ${await childRender(sy, this)}\
<div class="protyle-attr" contenteditable="false"></div>
</div>`
}
//TODO 语法高亮没有正确触发
return `<div ${strAttr(sy)}>
<div class="protyle-action">
<span class="protyle-action--first protyle-action__language">
${await renderHTML(
<span class="protyle-action--first protyle-action__language">${await renderHTML(
sy.Children?.find(
(el) => el.Type === 'NodeCodeBlockFenceInfoMarker',
),
)}
</span>
<span class="fn__flex-1"></span>
<span class="protyle-icon protyle-icon--only protyle-action__copy">
<svg><use xlink:href="#iconCopy"></use></svg>
</span>
)}</span>
<span class="fn__flex-1"></span><span class="protyle-icon protyle-icon--only protyle-action__copy"><svg><use xlink:href="#iconCopy"></use></svg></span>
</div>
${await renderHTML(
sy.Children?.find((el) => el.Type === 'NodeCodeBlockCode'),
Expand Down

0 comments on commit 5afe505

Please sign in to comment.