Gist.github prolog syntax highlight
On gist.github there are no prolog syntax highlight theme.
So what language should I choose for something really close to prolog syntax?
And, by the way, what's wrong with prolog? Is it really so unusab开发者_运维问答le?
The software behind https://gist.github.com/ uses Pygments, a Python syntax highlighter that includes support for Logtalk and thus ISO Prolog. There is already an open ticket to get not only Logtalk/Prolog but all languages supported by Pygments available for our gists:
http://support.github.com/discussions/gist/304-logtalk-support
Adding your comments to this ticket may help pushing for a fix ;-)
How about Erlang? Since Erlang was inspired by Prolog, to a great degree, it seems to be a reasonable match, and basic highlighting seems to work reasonably well for Prolog fact expressions, at least.
I would even dare to go with plain text (no highlight) since Prolog syntax is so simple that it's hard to imagine how useful having colored numbers or operators would be; perhaps highlighting built-in names is, so that you don't have to wander around the code in a possibly long and scarcely structured Prolog script searching for the implementation of a certain predicate, but that would not be served well by another language's syntax highlight algorithm.
I wouldn't say Prolog is unusable, just not very widespread. GitHub also interprets .pl
files as Perl, so on its languages page there is no mention of Prolog. StackOverflow itself does not highlight Prolog source code, nonetheless I find reading Prolog snippets published in questions and answers quite easy.
精彩评论