Merge pull request #16 from bentruyman/master
Added support for in/excluding empty lines from being matched as trailing whitespace.
This commit is contained in:
commit
d25170415d
|
@ -35,7 +35,9 @@ def is_find_results(view):
|
|||
|
||||
# Return an array of regions matching trailing spaces.
|
||||
def find_trailing_spaces(view):
|
||||
return view.find_all('[ \t]+$')
|
||||
include_empty_lines = bool(ts_settings.get('trailing_spaces_include_empty_lines',
|
||||
DEFAULT_IS_ENABLED))
|
||||
return view.find_all('[ \t]+$' if include_empty_lines else '(?<=\S)[\t ]+$')
|
||||
|
||||
|
||||
# Highlight trailing spaces
|
||||
|
|
|
@ -6,5 +6,8 @@
|
|||
"trailing_spaces_file_max_size" : 1048576,
|
||||
|
||||
// By default plugin is enabled or disabled (true|false)
|
||||
"trailing_spaces_enabled" : true
|
||||
"trailing_spaces_enabled" : true,
|
||||
|
||||
// By default empty lines are cleared
|
||||
"trailing_spaces_include_empty_lines" : true
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user