def build_inlinepatterns(md_instance, **kwargs):
 inlinePatterns = odict.OrderedDict()
 inlinePatterns[u'backtick'] = BacktickPattern(BACKTICK_RE)
 inlinePatterns[u'escape'] = EscapePattern(ESCAPE_RE, md_instance)
 inlinePatterns[u'reference'] = ReferencePattern(REFERENCE_RE, md_instance)
 inlinePatterns[u'link'] = LinkPattern(LINK_RE, md_instance)
 inlinePatterns[u'image_link'] = ImagePattern(IMAGE_LINK_RE, md_instance)
 inlinePatterns[u'image_reference'] = ImageReferencePattern(IMAGE_REFERENCE_RE, md_instance)
 inlinePatterns[u'short_reference'] = ReferencePattern(SHORT_REF_RE, md_instance)
 inlinePatterns[u'autolink'] = AutolinkPattern(AUTOLINK_RE, md_instance)
 inlinePatterns[u'automail'] = AutomailPattern(AUTOMAIL_RE, md_instance)
 inlinePatterns[u'linebreak'] = SubstituteTagPattern(LINE_BREAK_RE, u'br')
 if (md_instance.safeMode != u'escape'):
  inlinePatterns[u'html'] = HtmlPattern(HTML_RE, md_instance)
 inlinePatterns[u'entity'] = HtmlPattern(ENTITY_RE, md_instance)
 inlinePatterns[u'not_strong'] = SimpleTextPattern(NOT_STRONG_RE)
 inlinePatterns[u'em_strong'] = DoubleTagPattern(EM_STRONG_RE, u'strong,em')
 inlinePatterns[u'strong_em'] = DoubleTagPattern(STRONG_EM_RE, u'em,strong')
 inlinePatterns[u'strong'] = SimpleTagPattern(STRONG_RE, u'strong')
 inlinePatterns[u'emphasis'] = SimpleTagPattern(EMPHASIS_RE, u'em')
 if md_instance.smart_emphasis:
  inlinePatterns[u'emphasis2'] = SimpleTagPattern(SMART_EMPHASIS_RE, u'em')
 else:
  inlinePatterns[u'emphasis2'] = SimpleTagPattern(EMPHASIS_2_RE, u'em')
 return inlinePatterns

def build_inlinepatterns ( md_instance , ** kwargs ) : inlinePatterns = odict . OrderedDict ( ) inlinePatterns [ u'backtick' ] = BacktickPattern ( BACKTICK_RE ) inlinePatterns [ u'escape' ] = EscapePattern ( ESCAPE_RE , md_instance ) inlinePatterns [ u'reference' ] = ReferencePattern ( REFERENCE_RE , md_instance ) inlinePatterns [ u'link' ] = LinkPattern ( LINK_RE , md_instance ) inlinePatterns [ u'image_link' ] = ImagePattern ( IMAGE_LINK_RE , md_instance ) inlinePatterns [ u'image_reference' ] = ImageReferencePattern ( IMAGE_REFERENCE_RE , md_instance ) inlinePatterns [ u'short_reference' ] = ReferencePattern ( SHORT_REF_RE , md_instance ) inlinePatterns [ u'autolink' ] = AutolinkPattern ( AUTOLINK_RE , md_instance ) inlinePatterns [ u'automail' ] = AutomailPattern ( AUTOMAIL_RE , md_instance ) inlinePatterns [ u'linebreak' ] = SubstituteTagPattern ( LINE_BREAK_RE , u'br' ) if ( md_instance . safeMode != u'escape' ) : inlinePatterns [ u'html' ] = HtmlPattern ( HTML_RE , md_instance ) inlinePatterns [ u'entity' ] = HtmlPattern ( ENTITY_RE , md_instance ) inlinePatterns [ u'not_strong' ] = SimpleTextPattern ( NOT_STRONG_RE ) inlinePatterns [ u'em_strong' ] = DoubleTagPattern ( EM_STRONG_RE , u'strong,em' ) inlinePatterns [ u'strong_em' ] = DoubleTagPattern ( STRONG_EM_RE , u'em,strong' ) inlinePatterns [ u'strong' ] = SimpleTagPattern ( STRONG_RE , u'strong' ) inlinePatterns [ u'emphasis' ] = SimpleTagPattern ( EMPHASIS_RE , u'em' ) if md_instance . smart_emphasis : inlinePatterns [ u'emphasis2' ] = SimpleTagPattern ( SMART_EMPHASIS_RE , u'em' ) else : inlinePatterns [ u'emphasis2' ] = SimpleTagPattern ( EMPHASIS_2_RE , u'em' ) return inlinePatterns
build the default set of inline patterns for markdown .