# File lib/asciidoctor/abstract_node.rb, line 474 def read_asset path, opts = {} # remap opts for backwards compatibility opts = { :warn_on_failure => (opts != false) } unless ::Hash === opts if ::File.readable? path if opts[:normalize] Helpers.normalize_lines_from_string(::IO.read path) * LF else # QUESTION should we chomp or rstrip content? ::IO.read path end elsif opts[:warn_on_failure] warn %(asciidoctor: WARNING: #{(attr 'docfile') || '<stdin>'}: #{opts[:label] || 'file'} does not exist or cannot be read: #{path}) end end