markdown2.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:python-webapp-blog 作者: tzshlyt 项目源码 文件源码
def _hr_tag_re_from_tab_width(tab_width):
    return re.compile(r"""
        (?:
            (?<=\n\n)       # Starting after a blank line
            |               # or
            \A\n?           # the beginning of the doc
        )
        (                       # save in \1
            [ ]{0,%d}
            <(hr)               # start tag = \2
            \b                  # word break
            ([^<>])*?           #
            /?>                 # the matching end tag
            [ \t]*
            (?=\n{2,}|\Z)       # followed by a blank line or end of document
        )
        """ % (tab_width - 1), re.X)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号