Certificate chain files highlighted as diffs
Summary
Certificate chains, or files that contain two consecutive lines with ---
are being highlighted as diff files.
Steps to reproduce
- Create a file with the following contents:
-----BEGIN CERTIFICATE-----
first certificate
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
second certificate
-----END CERTIFICATE-----
Example Project
See cat/repro-diff-lexer - test1.crt which is the minimal example, and test2.crt which is the example above.
What is the current bug behavior?
Certificate chains are getting highlighted as diffs.
What is the expected correct behavior?
Diff highlighting should not catch these files.
Possible fixes
It might be a Rouge problem, looking at the highlighter - the lexer is guessed based on the filename and content.