def escape_md_section(text, snob=False):
    'Escapes markdown-sensitive characters across whole document sections.'
    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.
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