From 5374677e56216dffccb1f8887e8b03b23f8824fb Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Mon, 12 Feb 2024 20:59:04 -0800 Subject: [PATCH] Fix missing syntax highlighting on code snippets The artifact.language is unset on standard files that are not stdin. This change properly sets it to the lexer value of the parser.` Signed-off-by: Eric Brown --- precli/core/run.py | 1 + 1 file changed, 1 insertion(+) diff --git a/precli/core/run.py b/precli/core/run.py index 2e4bd537..881fa5b4 100644 --- a/precli/core/run.py +++ b/precli/core/run.py @@ -118,6 +118,7 @@ def parse_file( ), None, ) + artifact.language = parser.lexer if parser is not None: LOG.debug("Working on file: %s", artifact.file_name)