如何修复/忽略github中的语法错误 [英] How to fix/ignore syntax error in github
问题描述
我上传了一些代码给github,代码本身没有任何问题,但是我得到了某种语法错误......
我不相信我的代码有什么问题,因为我的文本编辑器不会引发错误。这是由中的
?'
>不是
造成的
如何摆脱这种突出显示? / a / 30669730/6309>此处提及
红色背景颜色肯定是由错误突出显示GitHub的文本编辑器/ viewe功能
这意味着语法高亮引擎胭脂和分段(在例如GitHub页面)的词法分析器没有正确解释这个序列字符。
对于xml,您可以尝试添加错误的字符('
或 #
)在同一个xml注释中看看是否缓解了这个问题
< a ... href ='#'>注册< / a> <! - ' - >
或
< a ... href ='#'>注册< / a> <! - # - >
I uploaded some code to github and there is nothing wrong with the code itself, but I get some kind of syntax error...
I do not believe there is anything wrong with my code as my text editor does not throw an error. Is this being caused by the '
in Don't
?
How can I get rid of this highlighting?
The red background-color is definitely being caused by the error-highlighting feature of GitHub's text editor/viewe
That means the syntax highlighting engine Rouge and Pygment (mentioned in GitHub pages for instance) has its lexer not intepreting correctly this sequence of characters.
For xml, you can try and add the faulty character ('
or #
) in an xml comment on the same line to see if that alleviate the problem
<a... href='#'>Register</a> <!-- ' -->
or
<a... href='#'>Register</a> <!-- # -->
这篇关于如何修复/忽略github中的语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!