Fix a regression disabling syntax highlighting in the API.

Review Request #12887 — Created March 14, 2023 and submitted

Information

Review Board
release-5.0.x

Reviewers

We just recently moved to a new internal configuration model for
controlling the rendering pipeline, but one call location (the FileDiff
API) was still using the old method. That'd be fine, except the old
method wasn't properly converting a request to disable syntax
highlighting.

This led to requests for diff data to return HTML versions of lines
instead of plain text.

The settings migration code now allows for disabling settings, and the
API has been updated for the new settings code.

Unit tests check to ensure that we're properly getting plain-text back
from it, unless requested otherwise.

Verified that the API returned plain text data for any diffs I queried.

A customer verified this fixed a regression they noticed.

Unit tests passed.

Summary ID
Fix a regression disabling syntax highlighting in the API.
We just recently moved to a new internal configuration model for controlling the rendering pipeline, but one call location (the FileDiff API) was still using the old method. That'd be fine, except the old method wasn't properly converting a request to disable syntax highlighting. This led to requests for diff data to return HTML versions of lines instead of plain text. The settings migration code now allows for disabling settings, and the API has been updated for the new settings code. Unit tests check to ensure that we're properly getting plain-text back from it, unless requested otherwise.
ea70784ebb8b0726b54fae3cb5188184fe17d18c
Description From Last Updated

'reviewboard.webapi.tests.mimetypes.diff_data_mimetype' imported but unused Column: 1 Error code: F401

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
david
  1. Ship It!
  2. 
      
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-5.0.x (cfa25ea)