mirror of
https://git.zx2c4.com/cgit
synced 2025-06-21 09:35:42 +02:00
ui-blame: Allow syntax highlighting
Place file contents into a single block so that syntax highlighting can be applied in the usual fashion. Place the alternating color bars behind the file contents. Force the default syntax highlighting background to transparent. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: John Keeping <john@keeping.me.uk>
This commit is contained in:
parent
aafc42d808
commit
dbaee2672b
3 changed files with 62 additions and 13 deletions
|
@ -34,7 +34,7 @@ sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='utf-8', errors='replace
|
|||
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
||||
data = sys.stdin.read()
|
||||
filename = sys.argv[1]
|
||||
formatter = HtmlFormatter(style='pastie')
|
||||
formatter = HtmlFormatter(style='pastie', nobackground=True)
|
||||
|
||||
try:
|
||||
lexer = guess_lexer_for_filename(filename, data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue