From a189d08c3095723a0eda54740a4c3368f123993c Mon Sep 17 00:00:00 2001 From: Osmose Date: Tue, 21 May 2019 17:26:06 -0700 Subject: [PATCH] Fix #1314: Add support for diffs from `git commit --verbose`. --- runtime/syntax/git-commit.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/runtime/syntax/git-commit.yaml b/runtime/syntax/git-commit.yaml index 3429edd2..d8c16479 100644 --- a/runtime/syntax/git-commit.yaml +++ b/runtime/syntax/git-commit.yaml @@ -23,3 +23,14 @@ rules: start: "^#" end: "$" rules: [] + + # Diffs (i.e. git commit --verbose) + - default: + start: "^diff" + # Diff output puts a space before file contents on each line so this + # should never match valid diff output and extend highlighting to the + # end of the file + end: "^ENDOFFILE" + limit-group: "magenta" + rules: + - include: "patch"