pombreda / gitblit

Automatically exported from code.google.com/p/gitblit
Apache License 2.0
0 stars 0 forks source link

XQuery sources highlighting #539

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
XQuery sources have additional extensions: "xqm" for module and "xql" as 
another general extension

What steps will reproduce the problem?
1. Open blob of file with extensions *.xqm and *.qxl

What is the expected output? What do you see instead?
syntax highlighting for XQuery sources

What version of the product are you using? On what operating system?
1.6.0

Please provide any additional information below.
I had try to add these extensions in gitblit.properties but highlughter had 
choose wrong code style (probably js)

Original issue reported on code.google.com by WStar...@gmail.com on 9 Dec 2014 at 12:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Additional, the same bug wit xml schema (extension "*.xsd") and XSLT 
(extensions "*.xsl", "*.xslt"). All of this is xml.

Original comment by WStar...@gmail.com on 9 Dec 2014 at 1:33

GoogleCodeExporter commented 9 years ago
Google-code-prettify is used for syntax highlighting.
https://code.google.com/p/google-code-prettify

Gitblit injects:

<pre class="prettyprint lang-{extension}">

If the extension is supported, google-code-prettify highlights it with whatever 
rules engine it finds.  Otherwise it falls back to it's internal lexer which 
claims to support XML langs natively.

I don't use those file types myself and I don't have a test repo to play with.

Gitblit could possibly have a mapping mechanism to coerce extensions to a known 
type, but I don't know if that will address your issue since it appears 
internally XML is the fallback lexer and evidently it's not very good. :)

The xsl case is probably diagnostic since that is an internally recognized 
extension.  If that looks crappy, then I don't think there is much hope for 
improving things with google-code-prettify.

Original comment by James.Mo...@gmail.com on 26 Feb 2015 at 3:53

GoogleCodeExporter commented 9 years ago
Because I'm not replacing GoogleCode prettify I don't see any action that can 
be taken in Gitblit to improve highlighting for your case.  Feel free to submit 
a PR which addresses your need should you disagree with the closing of this 
issue.

Original comment by James.Mo...@gmail.com on 7 Mar 2015 at 3:03