Set a threshold where syntax highlighting will turn off.

Review Request #625 — Created Nov. 11, 2008 and submitted


Review Board SVN (deprecated)


This setting allows you to control the maximum number of lines before disabling syntax highlighting.  Pygments can be extremely slow on large files.  The default (no limit) doesn't change any behavior.  I set this to 10000 on my site to handle some large files.

I thought I had posted this patch before, but I couldn't find it.  I just went through updating this to work with the new admin siteconfig stuff.
- Initially set up with no setting, syntax highlighting had no limit.
- Set limit to 10000, files larger than that had syntax highlighting disabled.
  1. This looks like a good change. It should certainly help in a lot of cases. One small thing and I'll commit.
  2. /trunk/reviewboard/diffviewer/ (Diff revision 1)
    Can you collapse these if statements?
  1. Went ahead and made that change and committed as r1639. Thanks for the patch :)