Sha256: 4ae998b63b530922c81e68dbb9b3e4ad16ad0e61feb42a8bc824f84c3993298d
Contents?: true
Size: 483 Bytes
Versions: 2
Compression:
Stored size: 483 Bytes
Contents
# frozen_string_literal: true # EDLs sometimes come with \r line breaks, and this is something that fails # with Ruby standard line separator detection. We need something to help us # with that. In this case we can just do a bulk replace because EDLs will be relatively # small for even very long features. class EDL::LinebreakMagician < StringIO LOOSE_CR = /#{Regexp.escape("\r")}/ def initialize(with_io) blob = with_io.read super(blob.gsub(LOOSE_CR, "\n")) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
edl-0.1.7 | lib/edl/linebreak_magician.rb |
edl-0.1.6 | lib/edl/linebreak_magician.rb |