Fix a regression disabling syntax highlighting in the API.
Review Request #12887 — Created March 14, 2023 and submitted
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
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.
'reviewboard.webapi.tests.mimetypes.diff_data_mimetype' imported but unused Column: 1 Error code: F401
Fixed an unused import for the new mimetype constant (but keeping the constant around to complete the test collection).
Revision 2 (+318 -6)
Checks run (2 succeeded)