X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/76e96cc0010b4db5159d3ebe360ce8e0e8729737..b434f05e58de158e651fbc83cead322f6a864d36:/lib/lyricli/lyrics_engine.rb?ds=sidebyside diff --git a/lib/lyricli/lyrics_engine.rb b/lib/lyricli/lyrics_engine.rb index 72ee402..1291d41 100644 --- a/lib/lyricli/lyrics_engine.rb +++ b/lib/lyricli/lyrics_engine.rb @@ -31,11 +31,15 @@ module Lyricli n.remove end + node.search("script").each do |n| + n.remove + end + node.search("br").each do |br| br.replace "\n" end - node.inner_text + node.inner_text.gsub(/\s+$/, "") end end end