From 485279de47564d54600b851e47a588e6a1309d6a Mon Sep 17 00:00:00 2001 From: Anton Rudeshko Date: Mon, 18 Feb 2019 01:54:11 +0300 Subject: [PATCH] match logins with trailing 'at' --- YandexWiki.sublime-syntax | 6 +++++- samples/sample.yawiki | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/YandexWiki.sublime-syntax b/YandexWiki.sublime-syntax index c6da6e8..7ce061e 100644 --- a/YandexWiki.sublime-syntax +++ b/YandexWiki.sublime-syntax @@ -6,7 +6,7 @@ first_line_match: ^[=]{1,6} scope: text.yawiki variables: - login: '\w[-\w]*\w' + login: '(\w)[-\w]*\w' contexts: main: @@ -53,6 +53,10 @@ contexts: captures: 1: markup.mention.qualifer scope: markup.mention + - match: '{{login}}@(?!(\w|@))' + captures: + 1: markup.mention.at + scope: markup.mention link: - match: '\(\((.+) (.+)\)\)' diff --git a/samples/sample.yawiki b/samples/sample.yawiki index 5574885..a79865c 100644 --- a/samples/sample.yawiki +++ b/samples/sample.yawiki @@ -37,7 +37,7 @@ __not underline __ foo --strikethrough-- bar -staff:foo, кому:bar, укого:baz, @FOO_BAR, staff:qux +staff:foo, кому:bar, укого:baz, @FOO_BAR, staff:qux, quux@ > some long > quote