def escape_md_section(text, snob=False):
 text = md_backslash_matcher.sub('\\\\\\1', text)
 if snob:
  text = md_chars_matcher_all.sub('\\\\\\1', text)
 text = md_dot_matcher.sub('\\1\\\\\\2', text)
 text = md_plus_matcher.sub('\\1\\\\\\2', text)
 text = md_dash_matcher.sub('\\1\\\\\\2', text)
 return text

def escape_md_section ( text , snob = False ) : text = md_backslash_matcher . sub ( '\\\\\\1' , text ) if snob : text = md_chars_matcher_all . sub ( '\\\\\\1' , text ) text = md_dot_matcher . sub ( '\\1\\\\\\2' , text ) text = md_plus_matcher . sub ( '\\1\\\\\\2' , text ) text = md_dash_matcher . sub ( '\\1\\\\\\2' , text ) return text
escapes markdown-sensitive characters across whole document sections .