mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 02:02:14 +02:00
diff kitten: Fix incorrect syntax highlighting with a few file formats such as yaml
This commit is contained in:
@@ -57,7 +57,7 @@ class DiffFormatter(Formatter):
|
|||||||
def format(self, tokensource, outfile):
|
def format(self, tokensource, outfile):
|
||||||
for ttype, value in tokensource:
|
for ttype, value in tokensource:
|
||||||
not_found = True
|
not_found = True
|
||||||
if value != '\n':
|
if value.rstrip('\n'):
|
||||||
while ttype and not_found:
|
while ttype and not_found:
|
||||||
tok = self.styles.get(ttype)
|
tok = self.styles.get(ttype)
|
||||||
if tok is None:
|
if tok is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user