mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 03:12:25 +01:00
Highlight C code in all man pages sections
This commit is contained in:
@@ -83,6 +83,7 @@ contexts:
|
||||
- match: ''
|
||||
pop: true
|
||||
- include: function-call
|
||||
- include: c-code
|
||||
|
||||
expect-command-line-option:
|
||||
- match: '[A-Za-z0-9-]+'
|
||||
@@ -127,9 +128,12 @@ contexts:
|
||||
- match: '$|(?=[],]|{{command_line_option}})'
|
||||
pop: true
|
||||
|
||||
synopsis:
|
||||
c-code:
|
||||
- match: '^(?=\s+(?:#include|/\*))'
|
||||
push: scope:source.c
|
||||
|
||||
synopsis:
|
||||
- include: c-code
|
||||
- match: \[
|
||||
scope: punctuation.section.brackets.begin.man
|
||||
push: command-line-option-or-pipe
|
||||
|
4
assets/syntaxes/02_Extra/syntax_test_man.man
vendored
4
assets/syntaxes/02_Extra/syntax_test_man.man
vendored
@@ -123,3 +123,7 @@ OPTIONS
|
||||
# ^^^ variable.parameter
|
||||
# ^^ - variable
|
||||
output NUM (default 3) lines of copied context
|
||||
|
||||
EXAMPLE
|
||||
#include <stdio.h>
|
||||
# ^^^^^^^^ source meta.preprocessor.include keyword.control.import.include
|
||||
|
Reference in New Issue
Block a user