lib/scss_lint/linter.rb in scss_lint-0.53.0 vs lib/scss_lint/linter.rb in scss_lint-0.54.0

- old
+ new

@@ -73,9 +73,13 @@ else line_source = engine.lines[range.start_pos.line - 1] line_source.length - range.start_pos.offset + 1 end + # Workaround for https://github.com/brigade/scss-lint/issues/887 to acount for + # https://github.com/sass/sass/issues/2284. + length = 1 if length < 1 + Location.new(range.start_pos.line, range.start_pos.offset, length) end # Extracts the original source code given a range. #