From a724339731afbb1387bd73c64a948e72a60a61ed Mon Sep 17 00:00:00 2001 From: Leonhard S Date: Thu, 28 Oct 2021 19:18:13 +0200 Subject: [PATCH] Allow named tags to end in numbers See #4 --- src/injection.yaml | 4 ++-- syntaxes/injection.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/injection.yaml b/src/injection.yaml index 1debe01..5ddc8a4 100644 --- a/src/injection.yaml +++ b/src/injection.yaml @@ -82,7 +82,7 @@ repository: emphasis: # For coding with ~passion~ \o/ patterns: - # Boild text, for when you need to write with passion + # Bold text, for when you need to write with passion - match: (\*\*)[^\t *][^*]+[^\t *](\*\*) captures: 1: { name: punctuation.definition.bold.sphinx } @@ -123,7 +123,7 @@ repository: tag: # RST inline tags. These are mostly used for autodoc tags, i.e. # things like ":param key:" or ":rtype: str". - match: (:)(${{ alpha }}[${{ alphaNum }} _\-\.]+?${{ alpha }}(\?_)?)(:)(?!`) + match: (:)(${{ alpha }}[${{ alphaNum }} _\-\.]+?${{ alphaNum }}(\?_)?)(:)(?!`) captures: 1: { name: punctuation.definition.interpreted.sphinx } 2: { name: entity.name.tag.sphinx } diff --git a/syntaxes/injection.json b/syntaxes/injection.json index 4048ec3..fdc90da 100644 --- a/syntaxes/injection.json +++ b/syntaxes/injection.json @@ -165,7 +165,7 @@ ] }, "tag": { - "match": "(:)([A-z][[A-z0-9] _\\-\\.]+?[A-z](\\?_)?)(:)(?!`)", + "match": "(:)([A-z][[A-z0-9] _\\-\\.]+?[A-z0-9](\\?_)?)(:)(?!`)", "captures": { "1": { "name": "punctuation.definition.interpreted.sphinx"