Sha256: 43116418ab592d46f5472fc6cfa525265d317dd40c515ec0cfdf9984538cfe5e

Contents?: true

Size: 389 Bytes

Versions: 9

Compression:

Stored size: 389 Bytes

Contents

# frozen_string_literal: true

module SlimLint
  class Linter::Zwsp < Linter
    include LinterRegistry

    MSG = 'Remove zero-width space'

    on_start do |_sexp|
      dummy_node = Struct.new(:line)
      document.source_lines.each_with_index do |line, index|
        next unless line.include?("\u200b")

        report_lint(dummy_node.new(index + 1), MSG)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
slim_lint-0.31.1 lib/slim_lint/linter/zwsp.rb
slim_lint-0.31.0 lib/slim_lint/linter/zwsp.rb
slim_lint-0.30.0 lib/slim_lint/linter/zwsp.rb
slim_lint-0.29.0 lib/slim_lint/linter/zwsp.rb
slim_lint-0.28.0 lib/slim_lint/linter/zwsp.rb
slim_lint-0.27.0 lib/slim_lint/linter/zwsp.rb
slim_lint-0.26.0 lib/slim_lint/linter/zwsp.rb
slim_lint-0.25.0 lib/slim_lint/linter/zwsp.rb
slim_lint-0.24.0 lib/slim_lint/linter/zwsp.rb