• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python inlinepatterns.Pattern类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中markdown.inlinepatterns.Pattern的典型用法代码示例。如果您正苦于以下问题:Python Pattern类的具体用法?Python Pattern怎么用?Python Pattern使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: __init__

 def __init__(self, markdown_instance=None, **kwargs):
     MooseMarkdownCommon.__init__(self, **kwargs)
     regex = r'^!chart\s+(?P<template>{})(?:$|\s+)(?P<settings>.*)'.format(self.TEMPLATE)
     Pattern.__init__(self, regex, markdown_instance)
     self._csv = dict() # CSV DataFrame cache
     self._count = 0
     self._status = None
开发者ID:aeslaughter,项目名称:moose,代码行数:7,代码来源:gchart.py


示例2: __init__

    def __init__(self, pattern, wrap, script, md):
        """Initialize."""

        self.script = script
        self.wrap = wrap[0] + '%s' + wrap[1]
        Pattern.__init__(self, pattern)
        self.markdown = md
开发者ID:PwnArt1st,项目名称:dotfiles,代码行数:7,代码来源:arithmatex.py


示例3: __init__

    def __init__(self, markdown_instance=None, **kwargs):
        MooseMarkdownCommon.__init__(self, **kwargs)
        Pattern.__init__(self, self.RE, markdown_instance)

        # The root/repo settings
        self._repo = kwargs.pop('repo')
        self._branch = kwargs.pop('branch')
开发者ID:zachmprince,项目名称:moose,代码行数:7,代码来源:listings.py


示例4: __init__

 def __init__ (self, start_end=None, groups=None):
   if start_end is not None:
     self.start_end = start_end
   if groups is not None:
     self.groups = groups
   pattern = r'(?<!\\)(%s)(.+?)(?<!\\)(%s)' % (self.start_end)
   Pattern.__init__(self, pattern)
开发者ID:nunb,项目名称:MaTiSSe,代码行数:7,代码来源:mdx_mathjax.py


示例5: __init__

    def __init__(self, markdown_instance=None, **kwargs):
        MooseCommonExtension.__init__(self, **kwargs)
        Pattern.__init__(self, self.RE, markdown_instance)

        # Valid settings for MOOSE specific documentation features
        # All other markdown 'attributes' will be treated as HTML
        # style settings for the figure tag.
        self._settings = {"caption": None}
开发者ID:jwpeterson,项目名称:moose,代码行数:8,代码来源:MooseImageFile.py


示例6: __init__

    def __init__(self, pattern, md, user, repo, provider, labels):
        """Initialize."""

        self.user = user
        self.repo = repo
        self.labels = labels
        self.provider = provider if provider in PROVIDER_INFO else ''
        Pattern.__init__(self, pattern, md)
开发者ID:PwnArt1st,项目名称:dotfiles,代码行数:8,代码来源:magiclink.py


示例7: __init__

    def __init__(self, regex, markdown_instance=None, syntax=None, **kwargs):
        MooseMarkdownCommon.__init__(self, **kwargs)
        Pattern.__init__(self, regex, markdown_instance)

        self._syntax = syntax

        # Error if the syntax was not supplied
        if not isinstance(self._syntax, dict):
            LOG.error("A dictionary of MooseApplicationSyntax objects must be supplied.")
开发者ID:mangerij,项目名称:moose,代码行数:9,代码来源:app_syntax.py


示例8: __init__

    def __init__(self, root=None, **kwargs):
        MooseCommonExtension.__init__(self)
        Pattern.__init__(self, self.RE, **kwargs)

        self._root = os.path.join(root, 'docs/media')

        # Valid settings for MOOS specific documentation features
        # All other markdown 'attributes' will be treated as HTML
        # style settings
        self._settings = {'caption' : None}
开发者ID:garvct,项目名称:Moose,代码行数:10,代码来源:MooseImageFile.py


示例9: __init__

  def __init__(self, markdown_instance=None, **kwargs):
    MooseCommonExtension.__init__(self, **kwargs)
    Pattern.__init__(self, self.RE, markdown_instance)

    # Load the yaml data containing package information
    self.package = MooseDocs.yaml_load("packages.yml")

    # The default settings
    self._settings = {'arch' : None,
             'return' : None}
开发者ID:gnsteve,项目名称:moose,代码行数:10,代码来源:MoosePackageParser.py


示例10: __init__

    def __init__(self, pattern, config):
        """Initialize."""

        # Generic setup
        self.generic = config.get('generic', False)
        wrap = config.get('tex_inline_wrap', ["\\(", "\\)"])
        self.wrap = wrap[0] + '%s' + wrap[1]

        # Default setup
        self.preview = config.get('preview', True)
        Pattern.__init__(self, pattern)
开发者ID:Haron-Prime,项目名称:My_config_files,代码行数:11,代码来源:arithmatex.py


示例11: __init__

    def __init__(self, regex, markdown_instance=None, yaml=None, syntax=None, **kwargs):
        MooseCommonExtension.__init__(self, **kwargs)
        Pattern.__init__(self, regex, markdown_instance)

        self._yaml = yaml
        self._syntax = syntax

        # Error if the YAML was not supplied
        if not isinstance(self._yaml, utils.MooseYaml):
            log.error("The MooseYaml object must be supplied to constructor of MooseObjectClassDescription.")

        # Error if the syntax was not supplied
        if not isinstance(self._syntax, dict):
            log.error("A dictionary of MooseApplicationSyntax objects must be supplied.")
开发者ID:hchen139,项目名称:moose,代码行数:14,代码来源:MooseSyntaxBase.py


示例12: __init__

    def __init__(self, pattern, config, md):
        """Initialize."""

        title = config['title']
        alt = config['alt']

        self._set_index(config["emoji_index"])
        self.markdown = md
        self.unicode_alt = alt in UNICODE_ALT
        self.encoded_alt = alt == UNICODE_ENTITY
        self.remove_var_sel = config['remove_variation_selector']
        self.title = title if title in VALID_TITLE else NO_TITLE
        self.generator = config['emoji_generator']
        self.options = config['options']
        Pattern.__init__(self, pattern)
开发者ID:PwnArt1st,项目名称:dotfiles,代码行数:15,代码来源:emoji.py


示例13: __init__

    def __init__(self, regex, config, language=None):
        Pattern.__init__(self, regex)
        #super(Pattern, self).__init__(regex) # This fails

        # Set the language
        self._language = language

        # The root directory
        self._config = config

        # The default settings
        self._settings = {'strip_header':True,
                          'repo_link':True,
                          'label':True,
                          'overflow-y':'scroll',
                          'max-height':'500px',
                          'strip-extra-newlines':False}
开发者ID:mll36,项目名称:moose,代码行数:17,代码来源:MooseSourcePatternBase.py


示例14: __init__

  def __init__(self, pattern, markdown_instance=None, repo=None, **kwargs):
    MooseCommonExtension.__init__(self, **kwargs)
    Pattern.__init__(self, pattern, markdown_instance)

    # The root/repo settings
    self._repo = repo

    # The default settings
    self._settings = {'strip_header'        : True,
             'repo_link'           : True,
             'label'               : True,
             'method'              : True,
             'language'            : 'text',
             'block'               : True,
             'strip-extra-newlines': False}

    # Applying overflow/max-height CSS to <div> and <code> causes multiple scroll bars
    # do not let code float, the div will do this for us
    self._invalid_css = { 'div' : ['overflow-y', 'overflow-x', 'max-height'], 'code' : ['float'] }
开发者ID:gnsteve,项目名称:moose,代码行数:19,代码来源:MooseTextPatternBase.py


示例15: __init__

 def __init__(self):
     Pattern.__init__(self, r'(>{2})(?P<comment_id>\d+)')
开发者ID:postman0,项目名称:1chan_django,代码行数:2,代码来源:markdown.py


示例16: __init__

 def __init__(self):
     Pattern.__init__(self, ur'(?P<url>(?P<proto>\w+)://(?:[\w\.\-%\:]*\@)?(?P<host>[\w\.\-%]+)(?::(?P<port>\d+))?(?P<path>(?:/[^\s\?\u0002\u0003]*)*)(?P<qs>\?[^#\s\u0002\u0003]*)?(?:#(?P<hash>\S+))?)')
开发者ID:Raegdan,项目名称:point-www,代码行数:2,代码来源:filters.py


示例17: __init__

 def __init__(self, *args, **kwargs): #pylint: disable=unused-argument
     Pattern.__init__(self, self.RE, *args)
开发者ID:zachmprince,项目名称:moose,代码行数:2,代码来源:refs.py


示例18: __init__

    def __init__(self, markdown_instance=None, **kwargs):
        MooseMarkdownCommon.__init__(self, **kwargs)
        Pattern.__init__(self, self.RE, markdown_instance)

        # Load the yaml data containing package information
        self.package = MooseDocs.yaml_load(kwargs.pop('package_file'))
开发者ID:mangerij,项目名称:moose,代码行数:6,代码来源:devel.py


示例19: __init__

    def __init__(self, pattern, md):
        """Initialize."""

        Pattern.__init__(self, pattern)
        self.markdown = md
开发者ID:dholbach,项目名称:pymdown-extensions,代码行数:5,代码来源:arithmatex.py


示例20: __init__

 def __init__(self, pattern, markdown_instance=None, oembed_consumer=None):
     Pattern.__init__(self, pattern, markdown_instance)
     self.consumer = oembed_consumer
开发者ID:Wenzil,项目名称:python-markdown-oembed,代码行数:3,代码来源:inlinepatterns.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python markdown2.markdown函数代码示例发布时间:2022-05-27
下一篇:
Python __main__.parse_options函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap