gpt4 book ai didi

internet-explorer - 仅适用于 Chrome 使用 SyntaxHighlighter 的额外行?

转载 作者:行者123 更新时间:2023-12-03 01:18:50 24 4
gpt4 key购买 nike

当我使用 Chrome 查看使用语法荧光笔的博客文章草稿(例如,在博客上)时,会插入额外的行

Chrome extra lines inserted

但在 IE 上看起来不错:

IE looks fine

知道我在这里做错了什么吗?

编辑:

我正在使用的 SyntaxHighlighter 的配置/设置如下:

<!-- Syntax Highlighter Additions START -->
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushcsharp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>

<script language='javascript' type='text/javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
</script>
<!-- Syntax Highlighter Additions END -->

编辑:

生成的 HTML 是:

<pre class="brush: csharp;">using System;
<br />using System.Text;
<br />using System.Collections.Generic;
<br />using System.Linq;
<br />using Microsoft.VisualStudio.TestTools.UnitTesting;
<br />using AccountTypeFollowUp;
<br />
<br />namespace PluginsUnitTests
<br />{
<br /> [TestClass]
<br /> public class AccountTypeFollowUpTests
<br /> {
<br /> [TestMethod]
<br /> public void AccountTypeFollowUp_Account_Is_Supplier()
<br /> {
<br /> throw new NotImplementedException();
<br /> }
<br />
<br /> [TestMethod]
<br /> public void AccountTypeFollowUp_Account_Is_Client()
<br /> {
<br /> throw new NotImplementedException();
<br /> }
<br />
<br /> [TestMethod]
<br /> public void AccountTypeFollowUp_Account_Is_Other)
<br /> {
<br /> throw new NotImplementedException();
<br /> }
<br /> }
<br />}
<br /></pre>

最佳答案

有同样的问题;它似乎是由 shCore.css 文件的这一部分引起的:

.syntaxhighlighter table td.gutter .line {
text-align: right !important;
padding: 0 0.5em 0 1em !important;
}

如果我将“填充”替换为:

padding: 0 5px  !important;

编号在 Chrome 中正常工作(不会对 Firefox 和 IE 显示产生负面影响),因此现在我的博客指向自定义的 shCore.css 而不是 http://alexgorbatchev.com/pub/sh/current/styles/shCore.css

关于internet-explorer - 仅适用于 Chrome 使用 SyntaxHighlighter 的额外行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11804789/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com