Commit graph

2 commits

Author SHA1 Message Date
Luke Granger-Brown
3f6518ce99 fix(gerrit): return HTML titles in more cases
At present, we don't return HTML titles if there's a trailing slash,
or a patchset. Instead, just consume the / and anything after it.

This also fixes /123, because this is HTTP redirected to the full path
*with a trailing slash* which otherwise wouldn't get the title
injected.

Change-Id: Idfd0e67752880a37dce0b400a3c1cfc53fac2912
Reviewed-on: https://cl.tvl.fyi/c/depot/+/859
Reviewed-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2020-07-03 18:18:42 +00:00
Luke Granger-Brown
89b3ab939b feat(gerrit): Syntax highlight rules.pl as Prolog.
This adds support for overriding the detected languages based on the
filename - we assume here that rules.pl will always map to a Prolog
file.

I could've overridden the entire default language to Prolog, since it's
unlikely that we'll have any Perl here, but given the relative
popularity of the two languages I opted to just override the file we
know we'll have (because it's used by Gerrit itself).

https://usercontent.irccloud-cdn.com/file/yhZZx1nd/highlighted_prolog.png

Change-Id: I26a7e6dab191e0b80a027b026f884020a1f07178
Reviewed-on: https://cl.tvl.fyi/c/depot/+/254
Reviewed-by: tazjin <mail@tazj.in>
2020-06-14 17:24:49 +00:00