lib/steep/server/code_worker.rb in steep-0.16.0 vs lib/steep/server/code_worker.rb in steep-0.16.1

- old
+ new

@@ -82,10 +82,10 @@ when Project::SourceFile::TypeCheckStatus status.typing.errors.map do |error| loc = error.location_to_str LSP::Interface::Diagnostic.new( - message: StringIO.new.tap {|io| error.print_to(io) }.string.gsub(/\A#{loc}: /, "").chomp, + message: StringIO.new.tap {|io| error.print_to(io) }.string.gsub(/\A#{Regexp.escape(loc)}: /, "").chomp, severity: LSP::Constant::DiagnosticSeverity::ERROR, range: LSP::Interface::Range.new( start: LSP::Interface::Position.new( line: error.node.loc.line - 1, character: error.node.loc.column