Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我将(从崇高文本复制)代码粘贴到“contenteditable”预标记中时,它看起来很好。当它被保存到数据库时,拉回并添加了“prettyprint”(google-code-prettify)类,它似乎添加了一堆随机空格。任何想法为什么?
从使用制表符缩进而不是空格缩进的 Sublime Text 复制的代码会生成带有错误间距的结果 pre 标签。这可能是 Sublime Text 或 pre 标签如何处理选项卡缩进的问题,谁知道呢?
修复:
检查它说“使用空格缩进”的位置,然后单击“将缩进转换为空格”以获得良好的测量效果。