Skip to content

Commit

Permalink
Fix missing syntax highlighting on code snippets (#283)
Browse files Browse the repository at this point in the history
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 <eric.brown@securesauce.dev>
  • Loading branch information
ericwb authored Feb 13, 2024
1 parent 2a09154 commit b6be611
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions precli/core/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b6be611

Please sign in to comment.