class Asciidoctor::Document::Title

def initialize val, opts = {}

def initialize val, opts = {}
  # TODO separate sanitization by type (:cdata for HTML/XML, :plain_text for non-SGML, false for none)
  if (@sanitized = opts[:sanitize]) && val.include?('<')
    val = val.gsub(XmlSanitizeRx, '').squeeze(' ').strip
  end
  if (sep = opts[:separator] || ':').empty? || !val.include?(sep = %(#{sep} ))
    @main = val
    @subtitle = nil
  else
    @main, _, @subtitle = val.rpartition sep
  end
  @combined = val
end