Need to Details of syntax highlighting file extensions

122 views
Skip to first unread message

Raj Ravi

unread,
Jul 8, 2021, 2:33:10 AM7/8/21
to Repo and Gerrit Discussion
Hi Folks,

We have found some files syntax are not wokring with syntax highlighting. we have used .xpsec as extension of a file and the code is xml. 

But the syntax is not generating for the xpsec files.

Can I get the details extension files which are used in syntax highlighting.

Gerrit version used 3.2.7 and 2.16.22

Regards,
Raj Ravi

Antoine Musso

unread,
Jul 19, 2021, 4:24:45 AM7/19/21
to Raj Ravi, Repo and Gerrit Discussion

Hello,

Gerrit 3 and Gerrit 2 with PolyGerrit are using highlight.js for syntax highlighting. The updates are mentioned in the Gerrit release notes:

For Gerrit 2.16.22 that seems to be highlight.js 10.0.2

For Gerrit 3.2.7 it is highlight.js 10.5.0 https://www.gerritcodereview.com/3.2.html#327

I don't quite know how it maps a file to a given language. Gerrit 3.2 UI code seems to indicate it uses the file content type which is provided by the server.   I have no idea though how Gerrit determines the file type on the server side :-\

-- 
Antoine "hashar" Musso
Release Engineering

thomasmu...@yahoo.com

unread,
Jul 27, 2021, 7:52:47 PM7/27/21
to Repo and Gerrit Discussion
Reply all
Reply to author
Forward
0 new messages