Fix Manpage C highlighting regression

This commit is contained in:
Keith Hall authored and David Peter committed 2020-10-17 16:46:18 +02:00
1 parent 3539d3e72d
commit 575888d81b
3 files changed
+36 -3

No files matched your search

+13 -2
View File
@@ -89,8 +89,9 @@ contexts:
scope: entity.name.command-line-option.man scope: entity.name.command-line-option.man
- match: '(\[)(=)' - match: '(\[)(=)'
captures: captures:
1: punctuation.section.brackets.begin.man
2: keyword.operator.man 2: keyword.operator.man
push: expect-parameter push: [command-line-option-or-pipe, expect-parameter]
- match: '\[' - match: '\['
push: push:
- meta_scope: entity.name.command-line-option.man - meta_scope: entity.name.command-line-option.man
@@ -112,13 +113,23 @@ contexts:
expect-parameter: expect-parameter:
- match: '[A-Za-z0-9-]+' - match: '[A-Za-z0-9-]+'
scope: variable.parameter.man scope: variable.parameter.man
- match: (?=\s+\|)
pop: true
- match: \| - match: \|
scope: keyword.operator.logical.man scope: keyword.operator.logical.man
- match: '\['
scope: punctuation.section.brackets.begin.man
push:
- match: '\]'
scope: punctuation.section.brackets.end.man
pop: true
- include: expect-parameter
- match: '$|(?=[],]|{{command_line_option}})' - match: '$|(?=[],]|{{command_line_option}})'
pop: true pop: true
synopsis: synopsis:
#- include: scope:source.c - match: '^(?=\s+(?:#include|/\*))'
push: scope:source.c
- match: \[ - match: \[
scope: punctuation.section.brackets.begin.man scope: punctuation.section.brackets.begin.man
push: command-line-option-or-pipe push: command-line-option-or-pipe
+22
View File
@@ -21,6 +21,22 @@ SYNOPSIS
# ^ punctuation.section.brackets.begin # ^ punctuation.section.brackets.begin
# ^^^^^^^^^^^^^^^^ entity.name.command-line-option # ^^^^^^^^^^^^^^^^ entity.name.command-line-option
# ^ punctuation.section.brackets.end # ^ punctuation.section.brackets.end
[-u | --set-upstream] [-o <string> | --push-option=<string>]
# ^ punctuation.section.brackets.begin
# ^^ entity.name.command-line-option
# ^ keyword.operator.logical
# ^^^^^^^^^^^^^^ entity.name.command-line-option
# ^ punctuation.section.brackets.end
# ^^^^^^^^^^^^^ entity.name.command-line-option
[--force-with-lease[=<refname>[:<expect>]]]
# ^ punctuation.section.brackets.begin
# ^^^^^^^^^^^^^^^^^^ entity.name.command-line-option
# ^ punctuation.section.brackets.begin
# ^ keyword.operator
# ^^^^^^^ variable.parameter
# ^ punctuation.section.brackets.begin
# ^^^^^^ variable.parameter
# ^^^ punctuation.section.brackets.end
example --system [options] example --system [options]
# ^^^^^^^^ entity.name # ^^^^^^^^ entity.name
@@ -28,6 +44,12 @@ SYNOPSIS
COMMON OPTIONS COMMON OPTIONS
[--quiet] [--debug] [--help|-h] [--version] [--conf FILE] [--quiet] [--debug] [--help|-h] [--version] [--conf FILE]
/* According to POSIX.1-2001, POSIX.1-2008 */
# ^^ source comment.block punctuation.definition.comment
#include <sys/select.h>
# ^^^^^^^^ source meta.preprocessor.include keyword.control.import.include
DESCRIPTION DESCRIPTION
example does something useful in relation to the command line options example does something useful in relation to the command line options
and configuration information in /etc/example.conf. and configuration information in /etc/example.conf.
@@ -1,4 +1,4 @@
SELECT(2) Linux Programmer's Manual SELECT(2) SELECT(2) Linux Programmer's Manual SELECT(2)
NAME NAME
 select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO - synchronous I/O multiplexing  select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO - synchronous I/O multiplexing