当前位置: 首页>>代码示例>>Python>>正文


Python Markdown.stripTopLevelTags方法代码示例

本文整理汇总了Python中markdown.Markdown.stripTopLevelTags方法的典型用法代码示例。如果您正苦于以下问题:Python Markdown.stripTopLevelTags方法的具体用法?Python Markdown.stripTopLevelTags怎么用?Python Markdown.stripTopLevelTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在markdown.Markdown的用法示例。


在下文中一共展示了Markdown.stripTopLevelTags方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: markdown

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
	def markdown(self, input_path, extensions=None):
		exts = ['abbr','fenced_code','footnotes','tables','codehilite','smarty','toc', 'attr_list','def_list'] if extensions==None else extensions
		style = ",".join(self.__sheets)
		styleext = MdStyle(configs={"sheets":[style, "The stylesheet list"]})
		exts += [styleext]
		md = Markdown(extensions=exts, output_format="html5")
		md.stripTopLevelTags = False
		md.reset().convertFile(input=input_path, output=input_path + ".html")
开发者ID:RemyPorter,项目名称:PTW,代码行数:10,代码来源:markdownstyle.py

示例2: md2node

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
def md2node(text):
    md = Markdown()
    md.serializer = Serializer(md)
    md.stripTopLevelTags = False
    md.postprocessors = OrderedDict()
    md.postprocessors['section'] = SectionPostprocessor()
    md.postprocessors['strip'] = StripPostprocessor()
    return md.convert(text)
开发者ID:shimizukawa,项目名称:sphinxcontrib-markdown,代码行数:10,代码来源:markdown.py

示例3: slack_markdown_converter

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
def slack_markdown_converter():
    """
    This is a Markdown converter for use with Slack.
    """
    md = Markdown(output_format='imtext', extensions=[ExtraExtension(), AnsiExtension()])
    md.preprocessors['LinkPreProcessor'] = LinkPreProcessor(md)
    md.stripTopLevelTags = False
    return md
开发者ID:dev-zero,项目名称:errbot,代码行数:10,代码来源:slack.py

示例4: slack_markdown_converter

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
def slack_markdown_converter(compact_output=False):
    """
    This is a Markdown converter for use with Slack.
    """
    enable_format('imtext', IMTEXT_CHRS, borders=not compact_output)
    md = Markdown(output_format='imtext', extensions=[ExtraExtension(), AnsiExtension()])
    md.preprocessors['LinkPreProcessor'] = LinkPreProcessor(md)
    md.stripTopLevelTags = False
    return md
开发者ID:elopio,项目名称:errbot,代码行数:11,代码来源:slack.py

示例5: borderless_ansi

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
def borderless_ansi():
    """This makes a converter from markdown to ansi (console) format.
    It can be called like this:
    from errbot.rendering import ansi
    md_converter = ansi()  # you need to cache the converter

    ansi_txt = md_converter.convert(md_txt)
    """
    md = Markdown(output_format='borderless', extensions=[ExtraExtension(), AnsiExtension()])
    md.stripTopLevelTags = False
    return md
开发者ID:nyimbi,项目名称:errbot,代码行数:13,代码来源:text.py

示例6: text

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
def text():
    """This makes a converter from markdown to text (unicode) format.
    It can be called like this:
    from errbot.rendering import text
    md_converter = text()  # you need to cache the converter

    pure_text = md_converter.convert(md_txt)
    """
    from .ansiext import AnsiExtension
    md = Markdown(output_format='text', extensions=[ExtraExtension(), AnsiExtension()])
    md.stripTopLevelTags = False
    return md
开发者ID:apophys,项目名称:errbot,代码行数:14,代码来源:__init__.py

示例7: imtext

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
def imtext():
    """This makes a converter from markdown to imtext (unicode) format.
    imtest is the format like gtalk, slack or skype with simple _ or * markup.

    It can be called like this:
    from errbot.rendering import imtext
    md_converter = imtext()  # you need to cache the converter

    im_text = md_converter.convert(md_txt)
    """
    from .ansiext import AnsiExtension
    md = Markdown(output_format='imtext', extensions=[ExtraExtension(), AnsiExtension()])
    md.stripTopLevelTags = False
    return md
开发者ID:apophys,项目名称:errbot,代码行数:16,代码来源:__init__.py

示例8: irc_md

# 需要导入模块: from markdown import Markdown [as 别名]
# 或者: from markdown.Markdown import stripTopLevelTags [as 别名]
def irc_md():
    """This makes a converter from markdown to mirc color format.
    """
    md = Markdown(output_format='irc', extensions=[ExtraExtension(), AnsiExtension()])
    md.stripTopLevelTags = False
    return md
开发者ID:Kaniabi,项目名称:errbot,代码行数:8,代码来源:irc.py


注:本文中的markdown.Markdown.stripTopLevelTags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。