如何修复/忽略github中的语法错误 [英] How to fix/ignore syntax error in github

查看:155
本文介绍了如何修复/忽略github中的语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我上传了一些代码给github,代码本身没有任何问题,但是我得到了某种语法错误......



我不相信我的代码有什么问题,因为我的文本编辑器不会引发错误。这是由中的'>不是



造成的

如何摆脱这种突出显示? 此处提及


红色背景颜色肯定是由错误突出显示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?

解决方案

As mentioned here

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆