Method: PGN::MoveText#clean_text

Defined in:
lib/pgn/game.rb

#clean_text(text) ⇒ Object



30
31
32
# File 'lib/pgn/game.rb', line 30

def clean_text(text)
  text&.gsub(/{(.*)}/, '\1')&.gsub(/\s+/, ' ')&.strip
end