Improper syntax highlighting for restructuredtext in gerrit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Core Infrastructure |
Fix Committed
|
Low
|
Khai Do |
Bug Description
As-is, the current syntax highlighting is distracting at best and misleading at worst.
Here's an RST file in review, for example:
https:/
- Randomly bold words break the utility of fixed-width fonts. For example, in the above review, lines 1 and 2 should be the same length according to restructuredtext syntax, but it's hard to judge without consistent character widths.
- Single quotes are treated as string delimiters. For example, the apostrophes used on lines 4 and 15 result in lines 4-15 being highlighted as a quotation.
I'd much prefer any attempt at syntax highlighting be turned off completely for RST files if syntax highlighting can't be performed as expected.
description: | updated |
description: | updated |
Changed in openstack-ci: | |
status: | New → Confirmed |
Changed in openstack-ci: | |
importance: | Undecided → Low |
Unsurprisingly, as a Google project, Gerrit embeds a minified http:// code.google. com/p/google- code-prettify/ to take care of syntax highlighting... and quite obviously, this lacks a style definition for reStructuredText. In theory we could code up an RST patch for prettify.js (even if it's just one which performs no highlighting), rebuild it, drop the result into the Gerrit source and rebuild that, then get it onto our servers.
In reality this means carrying patches for yet another project (google- code-prettify) until such time as we can get our addition upstreamed, then see it adopted by Gerrit upstream, then upgrade to that version of Gerrit. I'll try to get some consensus on how to prioritize this effort. While technically cosmetic, I understand that it is annoying to the point of actually making it hard to spot real errors (thus negating a lot of the benefit of a code review system in the first place).