File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
ST3072 = int (sublime .version ()) >= 3072
9
9
10
+ def is_enabled_for_view (view ):
11
+ valid_syntax = ['Note.tmLanguage' , 'Note.sublime-syntax' ]
12
+ syntax = view .settings ().get ("syntax" )
13
+ return any (syntax .endswith (s ) for s in valid_syntax )
10
14
11
15
class NoteOpenUrlCommand (sublime_plugin .TextCommand ):
12
16
@@ -18,7 +22,7 @@ def run(self, edit):
18
22
webbrowser .open_new_tab (url )
19
23
20
24
def is_enabled (self ):
21
- return 'Note.tmLanguage' in self .view . settings (). get ( "syntax" )
25
+ return is_enabled_for_view ( self .view )
22
26
23
27
if ST3072 :
24
28
class NotePreviewImageCommand (sublime_plugin .TextCommand ):
@@ -118,4 +122,4 @@ def getImageInfo(self, data):
118
122
return content_type , width , height
119
123
120
124
def is_enabled (self ):
121
- return 'Note.tmLanguage' in self .view . settings (). get ( "syntax" )
125
+ return is_enabled_for_view ( self .view )
You can’t perform that action at this time.
0 commit comments