Skip to content

Commit 92bed5a

Browse files
committed
Make dosctrings scoping consistent with normal strings
1 parent 7702075 commit 92bed5a

15 files changed

+121
-121
lines changed

Diff for: grammars/MagicPython.cson

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ repository:
159159
]
160160
}
161161
{
162-
name: "string.quoted.docstring.python"
162+
name: "string.quoted.docstring.single.python"
163163
begin: "(\\'|\\\")"
164164
end: "(\\1)|((?<!\\\\)\\n)"
165165
beginCaptures:
@@ -180,7 +180,7 @@ repository:
180180
]
181181
}
182182
{
183-
name: "string.quoted.docstring.raw.python"
183+
name: "string.quoted.docstring.raw.single.python"
184184
begin: "([rR])(\\'|\\\")"
185185
end: "(\\2)|((?<!\\\\)\\n)"
186186
beginCaptures:

Diff for: grammars/MagicPython.syntax.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ repository:
155155
- include: '#docstring-prompt'
156156
- include: '#codetags'
157157

158-
- name: string.quoted.docstring.python
158+
- name: string.quoted.docstring.single.python
159159
begin: (\'|\")
160160
end: (\1)|((?<!\\)\n)
161161
beginCaptures:
@@ -167,7 +167,7 @@ repository:
167167
- include: '#codetags'
168168
- include: '#docstring-guts-unicode'
169169

170-
- name: string.quoted.docstring.raw.python
170+
- name: string.quoted.docstring.raw.single.python
171171
begin: ([rR])(\'|\")
172172
end: (\2)|((?<!\\)\n)
173173
beginCaptures:

Diff for: grammars/MagicPython.tmLanguage

+2-2
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
</dict>
243243
<dict>
244244
<key>name</key>
245-
<string>string.quoted.docstring.python</string>
245+
<string>string.quoted.docstring.single.python</string>
246246
<key>begin</key>
247247
<string>(\&apos;|\&quot;)</string>
248248
<key>end</key>
@@ -282,7 +282,7 @@
282282
</dict>
283283
<dict>
284284
<key>name</key>
285-
<string>string.quoted.docstring.raw.python</string>
285+
<string>string.quoted.docstring.raw.single.python</string>
286286
<key>begin</key>
287287
<string>([rR])(\&apos;|\&quot;)</string>
288288
<key>end</key>

Diff for: misc/scopes

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ storage.type.string.python
121121
string.quoted.binary.multi.python
122122
string.quoted.binary.single.python
123123
string.quoted.docstring.multi.python
124-
string.quoted.docstring.python
125124
string.quoted.docstring.raw.multi.python
126-
string.quoted.docstring.raw.python
125+
string.quoted.docstring.raw.single.python
126+
string.quoted.docstring.single.python
127127
string.quoted.multi.python
128128
string.quoted.raw.binary.multi.python
129129
string.quoted.raw.binary.single.python

Diff for: test/docstrings/codetag2.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ def foo():
55

66

77

8-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
9-
foo bar : source.python, string.quoted.docstring.python
10-
XXX : keyword.codetag.notation.python, source.python, string.quoted.docstring.python
11-
baz : source.python, string.quoted.docstring.python
12-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.python
8+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
9+
foo bar : source.python, string.quoted.docstring.single.python
10+
XXX : keyword.codetag.notation.python, source.python, string.quoted.docstring.single.python
11+
baz : source.python, string.quoted.docstring.single.python
12+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
1313
: source.python
1414
def : meta.function.python, source.python, storage.type.function.python
1515
: meta.function.python, source.python
@@ -18,8 +18,8 @@ def : meta.function.python, source.python, storage.type.function.pytho
1818
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
1919
: : meta.function.python, punctuation.section.function.begin.python, source.python
2020
: source.python
21-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
22-
foo : source.python, string.quoted.docstring.python
23-
FIXME : keyword.codetag.notation.python, source.python, string.quoted.docstring.python
24-
baz : source.python, string.quoted.docstring.python
25-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.python
21+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
22+
foo : source.python, string.quoted.docstring.single.python
23+
FIXME : keyword.codetag.notation.python, source.python, string.quoted.docstring.single.python
24+
baz : source.python, string.quoted.docstring.single.python
25+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python

Diff for: test/docstrings/continuation2.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55

6-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
7-
: invalid.illegal.newline.python, source.python, string.quoted.docstring.python
8-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
9-
: invalid.illegal.newline.python, source.python, string.quoted.docstring.python
6+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
7+
: invalid.illegal.newline.python, source.python, string.quoted.docstring.single.python
8+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
9+
: invalid.illegal.newline.python, source.python, string.quoted.docstring.single.python

Diff for: test/docstrings/continuation3.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
: source.python
3737
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
3838
docstring : comment.line.number-sign.python, source.python
39-
r : source.python, storage.type.string.python, string.quoted.docstring.raw.python
40-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.python
41-
>>> print()a[wer] : source.python, string.quoted.docstring.raw.python
42-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.python
39+
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
40+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
41+
>>> print()a[wer] : source.python, string.quoted.docstring.raw.single.python
42+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python

Diff for: test/docstrings/def3.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def : meta.function.python, source.python, storage.type.function.pytho
2828
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
2929
: : meta.function.python, punctuation.section.function.begin.python, source.python
3030
: source.python
31-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
32-
TE : source.python, string.quoted.docstring.python
33-
\' : constant.character.python, source.python, string.quoted.docstring.python
34-
ST : source.python, string.quoted.docstring.python
35-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.python
31+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
32+
TE : source.python, string.quoted.docstring.single.python
33+
\' : constant.character.python, source.python, string.quoted.docstring.single.python
34+
ST : source.python, string.quoted.docstring.single.python
35+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
3636
: source.python
3737
def : meta.function.python, source.python, storage.type.function.python
3838
: meta.function.python, source.python
@@ -41,12 +41,12 @@ def : meta.function.python, source.python, storage.type.function.pytho
4141
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
4242
: : meta.function.python, punctuation.section.function.begin.python, source.python
4343
: source.python
44-
r : source.python, storage.type.string.python, string.quoted.docstring.raw.python
45-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.python
46-
TE : source.python, string.quoted.docstring.raw.python
47-
\' : source.python, string.quoted.docstring.raw.python
48-
ST : source.python, string.quoted.docstring.raw.python
49-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.python
44+
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
45+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
46+
TE : source.python, string.quoted.docstring.raw.single.python
47+
\' : source.python, string.quoted.docstring.raw.single.python
48+
ST : source.python, string.quoted.docstring.raw.single.python
49+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
5050
: source.python
5151
def : meta.function.python, source.python, storage.type.function.python
5252
: meta.function.python, source.python
@@ -55,12 +55,12 @@ def : meta.function.python, source.python, storage.type.function.pytho
5555
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
5656
: : meta.function.python, punctuation.section.function.begin.python, source.python
5757
: source.python
58-
R : source.python, storage.type.string.python, string.quoted.docstring.raw.python
59-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.python
60-
TE : source.python, string.quoted.docstring.raw.python
61-
\' : source.python, string.quoted.docstring.raw.python
62-
ST : source.python, string.quoted.docstring.raw.python
63-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.python
58+
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
59+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
60+
TE : source.python, string.quoted.docstring.raw.single.python
61+
\' : source.python, string.quoted.docstring.raw.single.python
62+
ST : source.python, string.quoted.docstring.raw.single.python
63+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
6464
: source.python
6565
def : meta.function.python, source.python, storage.type.function.python
6666
: meta.function.python, source.python

Diff for: test/docstrings/def4.py

+17-17
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ def : meta.function.python, source.python, storage.type.function.pytho
2828
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
2929
: : meta.function.python, punctuation.section.function.begin.python, source.python
3030
: source.python
31-
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
32-
TE : source.python, string.quoted.docstring.python
33-
\" : constant.character.python, source.python, string.quoted.docstring.python
34-
ST : source.python, string.quoted.docstring.python
35-
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.python
31+
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
32+
TE : source.python, string.quoted.docstring.single.python
33+
\" : constant.character.python, source.python, string.quoted.docstring.single.python
34+
ST : source.python, string.quoted.docstring.single.python
35+
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
3636
: source.python
3737
def : meta.function.python, source.python, storage.type.function.python
3838
: meta.function.python, source.python
@@ -41,12 +41,12 @@ def : meta.function.python, source.python, storage.type.function.pytho
4141
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
4242
: : meta.function.python, punctuation.section.function.begin.python, source.python
4343
: source.python
44-
r : source.python, storage.type.string.python, string.quoted.docstring.raw.python
45-
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.python
46-
TE : source.python, string.quoted.docstring.raw.python
47-
\" : source.python, string.quoted.docstring.raw.python
48-
ST : source.python, string.quoted.docstring.raw.python
49-
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.python
44+
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
45+
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
46+
TE : source.python, string.quoted.docstring.raw.single.python
47+
\" : source.python, string.quoted.docstring.raw.single.python
48+
ST : source.python, string.quoted.docstring.raw.single.python
49+
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
5050
: source.python
5151
def : meta.function.python, source.python, storage.type.function.python
5252
: meta.function.python, source.python
@@ -55,12 +55,12 @@ def : meta.function.python, source.python, storage.type.function.pytho
5555
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
5656
: : meta.function.python, punctuation.section.function.begin.python, source.python
5757
: source.python
58-
R : source.python, storage.type.string.python, string.quoted.docstring.raw.python
59-
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.python
60-
TE : source.python, string.quoted.docstring.raw.python
61-
\" : source.python, string.quoted.docstring.raw.python
62-
ST : source.python, string.quoted.docstring.raw.python
63-
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.python
58+
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
59+
" : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
60+
TE : source.python, string.quoted.docstring.raw.single.python
61+
\" : source.python, string.quoted.docstring.raw.single.python
62+
ST : source.python, string.quoted.docstring.raw.single.python
63+
" : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
6464
: source.python
6565
def : meta.function.python, source.python, storage.type.function.python
6666
: meta.function.python, source.python

Diff for: test/docstrings/mix2.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ def bar(self, a:'TEST')
1818

1919

2020

21-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
22-
TEST : source.python, string.quoted.docstring.python
23-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.python
21+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
22+
TEST : source.python, string.quoted.docstring.single.python
23+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
2424
: source.python
2525
class : meta.class.python, source.python, storage.type.class.python
2626
: meta.class.python, source.python
@@ -30,10 +30,10 @@ class : meta.class.python, source.python, storage.type.class.python
3030
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
3131
comment : comment.line.number-sign.python, source.python
3232
: source.python
33-
R : source.python, storage.type.string.python, string.quoted.docstring.raw.python
34-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.python
35-
TEST : source.python, string.quoted.docstring.raw.python
36-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.python
33+
R : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
34+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
35+
TEST : source.python, string.quoted.docstring.raw.single.python
36+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
3737
: source.python
3838
: meta.function.python, source.python
3939
def : meta.function.python, source.python, storage.type.function.python
@@ -60,10 +60,10 @@ def : meta.function.python, source.python, storage.type.function.pytho
6060
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
6161
ok : comment.line.number-sign.python, source.python
6262
: source.python
63-
r : source.python, storage.type.string.python, string.quoted.docstring.raw.python
64-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.python
65-
TEST : source.python, string.quoted.docstring.raw.python
66-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.python
63+
r : source.python, storage.type.string.python, string.quoted.docstring.raw.single.python
64+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.raw.single.python
65+
TEST : source.python, string.quoted.docstring.raw.single.python
66+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.raw.single.python
6767
: source.python
6868
with : keyword.control.flow.python, source.python
6969
bar: : source.python
@@ -94,9 +94,9 @@ def : meta.function.python, source.python, storage.type.function.pytho
9494
: source.python
9595
pass : keyword.control.flow.python, source.python
9696
: source.python
97-
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.python
98-
TEST : source.python, string.quoted.docstring.python
99-
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.python
97+
' : punctuation.definition.string.begin.python, source.python, string.quoted.docstring.single.python
98+
TEST : source.python, string.quoted.docstring.single.python
99+
' : punctuation.definition.string.end.python, source.python, string.quoted.docstring.single.python
100100
: source.python
101101
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
102102
additional docstring : comment.line.number-sign.python, source.python

0 commit comments

Comments
 (0)