Microsoft/monaco-editor

Monaco Editor Colorize - Break Word Problem

Open

#2,701 创建于 2021年10月22日

在 GitHub 查看
 (0 评论) (0 反应) (1 负责人)JavaScript (1,283 fork)batch import
bughelp wanted

仓库指标

Star
 (14,836 star)
PR 合并指标
 (平均合并 6小时 26分钟) (30 天内合并 15 个 PR)

描述

When we use monaco editor colorize for highlighting content, break-word is not happening properly. The reason is that you use   content for making spaces in content. So that we can't break word properly using CSS.

Example Code like this :

<span>
    <span class="mtk1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(</span>
    <span class="mtk40">'.zc-branchesBody&nbsp;.dropdown-content'</span>
    <span class="mtk1">).css(</span>
    <span class="mtk40">'max-height'</span>
     <span class="mtk1">,&nbsp;</span>
</span>

If the span tag containing like this "word-break: break-word" is not possible using CSS and javascript.

Any idea for "breakword containing   content" ?

贡献者指南