# File lib/asciidoctor/document.rb, line 645 def doctitle opts = {} if !(val = @attributes['title'].nil_or_empty?) val = title elsif (sect = first_section) 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, '').squeeze(' ').strip else val end end