Page MenuHomePhabricator

Control diffusion's syntax highlighting
Closed, ResolvedPublic


When viewing a file in diffusion, you seem to get no highlighting for a file like README (sample), and text/x-c++ highlighting for (sample, though epriestley just fixed this in syntax.filemap in master). It would be nice to be able to specify "highlight as Remarkup" or reStructuredText or whatever.

@avivey pointed out in IRC that you can do this when browsing a particular commit; each diff viewer in a commit has a View Options > Highlight As... dropdown where you can can override the default text highlighting (sample).

Perhaps there's a workaround where you can influence the highlighting by tweaking the diffusion URL, but the obvious ?highlight=remarkup didn't work.

Note this is just changing the highlighting of the file's text. T5698: Github-style Remarkup previews on a checked-in resource is to actually render the file differently.

Event Timeline

spage raised the priority of this task from to Needs Triage.
spage updated the task description. (Show Details)
spage added a project: Diffusion.
spage added subscribers: spage, avivey.

Specifically, the UI currently has this mess of a problem corner:

viewdrop.png (1×1 px, 262 KB)

I plan to add a "View Options" dropdown to contain these options, similar to Differential:

  • Highlighting On / Off
  • Highlight Language (NEW!)
  • Encoding (NEW!)
  • Blame On / Off
  • Lint On / Off
  • Open In Editor

And "View Raw" will either go in there too or move up to the main actions.

epriestley claimed this task.

Effectively now covered by T13105.