Skip to content

Commit

Permalink
match logins with trailing 'at'
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-rudeshko committed Feb 17, 2019
1 parent 478b137 commit 485279d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion YandexWiki.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ first_line_match: ^[=]{1,6}
scope: text.yawiki

variables:
login: '\w[-\w]*\w'
login: '(\w)[-\w]*\w'

contexts:
main:
Expand Down Expand Up @@ -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: '\(\((.+) (.+)\)\)'
Expand Down
2 changes: 1 addition & 1 deletion samples/sample.yawiki
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 485279d

Please sign in to comment.