Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit af793cf

Browse files
committed
Merge branch 'tleruitte-master'
2 parents 9c7f8a5 + 0fb0f88 commit af793cf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎AngularJS-sublime-package.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def add_indexed_directives(self):
313313
indexed_attrs = [
314314
tuple([
315315
'ngDir_' + self.definitionToDirective(directive) + '\tAngularJS',
316-
self.definitionToDirective(directive)+'="$1"$0'
316+
('data-' if self.settings.get('enable_data_prefix') else '') + self.definitionToDirective(directive)+'="$1"$0'
317317
]) for directive in indexes if re.match('directive:', directive[0])
318318
]
319319
return list(set(indexed_attrs))
@@ -388,9 +388,9 @@ def on_query_completions(self, view, prefix, locations):
388388
return jscompletions.get(('module'), ng.get_current_project_indexes())
389389
return jscompletions.in_string_completions(prefix, ng.get_current_project_indexes())
390390

391-
if(viewlocation.at_html_attribute(view, 'ng-controller', locations)):
391+
if(viewlocation.at_html_attribute(view, ('data-' if ng.settings.get('enable_data_prefix') else '') + 'ng-controller', locations)):
392392
return jscompletions.get(('controller'), ng.get_current_project_indexes())
393-
if(viewlocation.at_html_attribute(view, 'ng-app', locations)):
393+
if(viewlocation.at_html_attribute(view, ('data-' if ng.settings.get('enable_data_prefix') else '') + 'ng-app', locations)):
394394
return jscompletions.get(('module'), ng.get_current_project_indexes())
395395
if(view.score_selector(_scope, ng.settings.get('filter_scope'))):
396396
return ng.filter_completions()

‎viewlocation.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def at_html_attribute(view, attribute, locations):
2424
check_attribute = ''
2525
view_point = locations[0]
2626
char = ''
27-
while(char != ' ' and view_point > -1):
27+
while(not char.isspace() and view_point > -1):
2828
char = view.substr(view_point)
29-
if(char != ' '):
29+
if(not char.isspace()):
3030
check_attribute += char
3131
view_point -= 1
3232
check_attribute = check_attribute[::-1]

0 commit comments

Comments
 (0)