Skip to content

Commit

Permalink
Merge branch 'master' of github.com:kylebebak/Requester
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebebak committed Oct 17, 2017
2 parents fde7fe7 + d7e2f32 commit 6268590
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
3 changes: 2 additions & 1 deletion messages.json
Expand Up @@ -28,5 +28,6 @@
"2.19.0": "messages/2.19.0.txt",
"2.19.1": "messages/2.19.1.txt",
"2.19.2": "messages/2.19.2.txt",
"2.20.0": "messages/2.20.0.txt"
"2.20.0": "messages/2.20.0.txt",
"2.21.1": "messages/2.21.1.txt"
}
4 changes: 4 additions & 0 deletions messages/2.21.1.txt
@@ -0,0 +1,4 @@
# Bug Fixes
Much better syntax highlighting for requester files, thanks to @jcberquist!

Also, fixed bug in explore request command, which choked on requests with a dangling, trailing comma.
3 changes: 1 addition & 2 deletions syntax/requester-source-identifiers.tmPreferences
Expand Up @@ -12,8 +12,7 @@
<integer>1</integer>
<key>symbolTransformation</key>
<string>
s/(requests\.)?(get|options|head|post|put|patch|delete)(.*)/\U\2\E:\3/g;
s/\(/ /g;
s/.*?(get|options|head|post|put|patch|delete)\s*\(\s*(.*)/\U\1\E: \2/g;
</string>
</dict>
</dict>
Expand Down
26 changes: 16 additions & 10 deletions syntax/requester-source.sublime-syntax
Expand Up @@ -13,8 +13,11 @@ contexts:
push: env
- match: "^(?=##)"
push: header
- match: ^(?=([\w_][\w\d_]*\.)?(get|options|head|post|put|patch|delete))
push: identifier
- match: ^([\w_][\w\d_]*\.)?(get|options|head|post|put|patch|delete)\s*(\()
captures:
2: variable.function.python
3: punctuation.section.arguments.begin.python
push: [function-call, identifier]

env:
- match: "\n"
Expand All @@ -28,13 +31,16 @@ contexts:
- match: .*
scope: storage.header.requester

function-call:
- meta_scope: meta.function-call.python
- match: \)
scope: punctuation.section.arguments.end.python
pop: true
- include: "Packages/Python/Python.sublime-syntax#arguments"

identifier:
- meta_content_scope: meta.identifier.requester
- match: "[,)]"
- meta_scope: meta.identifier.requester
- match: (?=[,)])
pop: true
- match: "'.*?'"
scope: string.quoted.single.python
- match: '".*?"'
scope: string.quoted.double.python
- match: '\+'
scope: keyword.operator.arithmetic.python
- include: "Packages/Python/Python.sublime-syntax#arguments"

0 comments on commit 6268590

Please sign in to comment.