def line_md_type(l)
return :text if l =~ /^[a-zA-Z]/
return :code if number_of_leading_spaces(l)>=4
return :empty if l =~ /^\s*$/
return :footnote_text if l =~ FootnoteText
return :ref_definition if l =~ LinkRegex or l=~ IncompleteLink
return :abbreviation if l =~ Abbreviation
return :definition if l =~ Definition
return :text if l=~ /^[ ]{0,3}#{EMailAddress}/
return :text if l=~ /^[ ]{0,3}<http:/
return :xml_instr if l =~ %r{^\s*<\?}
return :raw_html if l =~ %r{^[ ]?[ ]?[ ]?</?\s*\w+}
return :raw_html if l =~ %r{^[ ]?[ ]?[ ]?<\!\-\-}
return :ulist if l =~ /^[ ]{0,1}([\*\-\+])\s+.*\w+/
return :olist if l =~ /^[ ]{0,1}\d+\..*\w+/
return :header1 if l =~ /^(=)+/
return :header2 if l =~ /^([-\s])+$/
return :header3 if l =~ /^(#)+\s*\S+/
return :hrule if l =~ /^(\s*\*\s*){3,1000}$/
return :hrule if l =~ /^(\s*-\s*){3,1000}$/
return :hrule if l =~ /^(\s*_\s*){3,1000}$/
return :quote if l =~ /^>/
return :metadata if l =~ /^@/
return :ald if l =~ AttributeDefinitionList
return :ial if l =~ InlineAttributeList
return :text
end