HomePhabricator

Fix an issue where any diff which could possibly be rendered as Jupyter decided…

Authored by epriestley on Wed, Oct 2, 1:46 AM.

Description

Fix an issue where any diff which could possibly be rendered as Jupyter decided to render as Jupyter

Summary:
See PHI1468. Engine selection for diffs is currently too aggressive in trying to find a shared engine and will fall back a shared engine with a very low score, causing all ".json" files to render as Jupyter files.

Only pick an engine as a difference engine by default if it's the highest-scoring engine for the new file.

Test Plan: Viewed ".json" files and ".ipynb" files in a revision. Before, both rendered as Jupyter. Now, the former rendered as JSON and the latter rendered as Jupyter.

Differential Revision: https://secure.phabricator.com/D20850