This is driving me nuts.
Syntax highlighting doesn't work on a single Wiki page in a project on GitHub.
Take this page, for example: https://github.com/oscar-broman/PAWN-Boilerplate/wiki/Built-in-modules
Here's the source for it: https://gist.github.com/3128950
Oh, great, syntax highlighting works even there.
It seems the reason was I put C++ in some places, only c++ is accepted by the Wiki. If one place has the capital C, no highlighting will be done.
Related
I've read this page:
https://help.github.com/articles/creating-and-highlighting-code-blocks/
And everywhere else on Github I can do syntax highlighting inside markdown very simply.
However, on my recent project the syntax highlighting has completely given up on Wiki pages, I can't get it work at all. Everywhere I look the only answer seems to be "make sure you specify the language". It seems like no matter how I specify the language the syntax highlighting doesn't work.
Example page:
https://github.com/ClickSimply/Nano-SQL/wiki/3.-Advanced
However, on that exact same project the highlighting is working as expected in the ReadMe
https://github.com/ClickSimply/Nano-SQL
Seriously out of ideas here, any help is appreciated.
Reached out directly to Github support, this is an issue they're currently working to resolve.
github automaticall syntax highlights any code files such as those with .c extensions. And there seems plenty of information about controlling highlighting from within 'markdown' or .md files.
But how can I get it to highlight code files that it doesn't know about?
I can't even get the tabbing right - if I say 4-spaces tabs while editing, it goes back to 8-space ones when I've finished.
I don't care what highlighting style it uses even if it's the wrong language; it must be better than the plain text appearance which looks really flat. Oddly, when editing it uses some sort of highlighting, which again disappears when I've finished.
The files aren't in any well-known language so the highlighting won't be perfect; I just want a bit of colour. But I'd rather not change file extensions as that could be confusing.
The tabbing is done through a ?t=4 parameter added to the GitHub url.
But the syntax highlighting (using Rouge on GitHub pages for instance) itself is either:
set in fenced code block (but only for .md markdown pages)
or by changing the file extension (which you don't want)
But how can I get it to highlight code files that it doesn't know about?
Update Feb. 2021 (5 years later)
Nat Friedman (CEO of GitHub) announces it on Twitter:
Another tiny but nice improvement we just shipped to GitHub – syntax highlighting now works on new files without the need to commit first.
On Github, I realized that &&s are highlighted in this file but not in the other languages such as Java, JavaScript etc in the same repo. Does anyone know what the highlight actually means?
Thanks
Allen
Because it is an ASHX (WebHandler) file. The syntax highlighting on GitHub it language-specific:
What is ASHX:
http://www.c-sharpcorner.com/uploadfile/prathore/what-is-an-ashx-file-handler-or-web-handler/
Another example of GitHub syntax highlighting for ASHX:
https://github.com/JamesDunne/sql.ashx/blob/master/sql.ashx
This is a bug with GitHub Linguist, which is not selecting the right grammar for highlighting. The current grammar is expecting this kind of syntax and is unable to highlight your file.
My guess is we'd need to select a new grammar just for .ashx. If you know a TextMate, Sublime Text, or Atom grammar capable of highlighting correctly .ashx files, please open an issue or pull request at Linguist.
I am not a coder, so consider myself a big rookie with Git tools and services like Gitlab.com, however I've noticed that when I read a .md file on Gitlab, it won't italicize chains of characters when they directly follow an opening bracket (, while it did work with Bitbucket and Github.
If I write (*e.g.*, the .md viewed on Gitlab will show (*e.g.* instead of (e.g., which is a big issue for me as I intend to use Markdown to write academic papers (and take advantage of the Gitlab versioning, among other things) and often need italics. Any ideas on how to solve that? Is HTML the only way to italicize first words in brackets on Gitlab.com? Closing brackets ) do not block the emphasis, only opening brackets ( do.
Thanks a lot!
This seems to be resolved in latest version. I created a playground repo, also tested on wiki.
https://gitlab.com/axil/playground/blob/master/README.md
https://gitlab.com/axil/playground/wikis/home
I started using Code Collector Pro to organise and save my Emacs codes, and this software requires TextMate bundles for syntax highlighting. They have a lisp bundle, but not an elisp bundle, at least not that I can see. I would think that the syntax highlighting would work under the lisp bundle, but for some reason it isn't happening.
I have never even seen any lisp code with syntax highlighting, so it is possible that the thing is working and I don't know, but I honestly don't think so, because the ;; before a line seems to me to be a comment thing, so anything after that should be in the color defined for comments which in my case is green. Here is a picture of my code collector screen with a piece of code written by huaiyuan answering my question posted here:
Is this looking as it should or is there something wrong?
Back to the initial question: is there a textmate bundle for elisp or a bundle like the ones from textmate I can download to get syntax highlighting?
I wouldn't have thought so, because anyone writing elisp is going to do it in Emacs so there wouldn't be any call for a Textmate bundle for it.