# File lib/asciidoctor/document.rb, line 633 def doctitle opts = {} if !(val = @attributes['title'].nil_or_empty?) val = title elsif (sect = first_section) && sect.title? val = sect.title elsif opts[:use_fallback] && (val = @attributes['untitled-label']) # use val set in condition else return end if (separator = opts[:partition]) Title.new val, opts.merge({ :separator => (separator == true ? @attributes['title-separator'] : separator) }) elsif opts[:sanitize] && val.include?('<') val.gsub(XmlSanitizeRx, '').tr_s(' ', ' ').strip else val end end