class Solargraph::Source::Change
def repair text
-
(String)
- The updated text.
Parameters:
-
text
(String
) -- The text to be changed.
def repair text fixed = new_text.gsub(/[^\s]/, ' ') if range.nil? fixed else result = commit text, fixed off = Position.to_offset(text, range.start) match = result[0, off].match(/[\.:]+\z/) if match result = result[0, off].sub(/#{match[0]}\z/, ' ' * match[0].length) + result[off..-1] end result end end