import re


def _increase_heading_level(s, increase=0):
    """
    increase heading level by `increase` steps
    """
    if increase <= 0: return s
    repl = "#"*(increase+1)
    return re.subn("^#", repl, s, flags=re.MULTILINE)[0]