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


Python inlinepatterns.Pattern类代码示例

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


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


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