Bill Fenner wrote:
We've been having trouble with the diff viewer highlighting the wrong
part of the file (e.g., it highlights 6 lines as being added, but
those 6 lines are 12 lines above the lines that were actually added).
I finally root-caused this to embedded control characters inside
comments.  This source, for better or for worse, has comments like

/* ^L */

where ^L is literally a control-L.  In vi with :number set, this appears as:

 890 /* ^L */

In the reviewboard diff viewer, this appears as:

890 /*
891  */


My 2 cents, having anything on the same "line" after a FormFeed is kinda hard to grok.

I have an old code base (presumably like yours) that has FF (CTRL-L, 0x0c, etc.) characters all over. Reviewboard (and pygments) haven't had any problems BUT the use of ^L in our the code has been consistently followed by a new line (most of these are not in comments but that is a by-the-by).

Options appear to be:

  1. "fix" your code base, e.g. write a small python script to replace
     all '\x0c' occurrences with '\x0c\n' and just submit the updated
     code. Kinda dirty and a pain if you have multiple branches
  2. modify pygments
  3. modify Reviewboard

For #2 and #3 this would be something like convert all '\x0c' occurrences with '^L' so that the display shows something.

You may want to mail the pygments mailing list and see what they say about displaying ^L. I'd suggest generating an ascii table with each character taking one line (with some padding) and see what pygments does for all the characters from 0-127, there may be other control characters that an alternate visual replacement would make sense for (e.g. BEL).


Want to help the Review Board project? Donate today at
Happy user? Let us know at
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to