def __init__(self, config, md): """Initialize.""" self.script = config.get('insert_as_script', False) wrap = config.get('tex_block_wrap', ['\\[', '\\]']) self.wrap = wrap[0] + '%s' + wrap[1] allowed_patterns = set( config.get('block_syntax', ['dollar', 'square', 'begin'])) pattern = [] if 'dollar' in allowed_patterns: pattern.append(self.RE_DOLLAR_BLOCK) if 'square' in allowed_patterns: pattern.append(self.RE_BRACKET_BLOCK) if 'begin' in allowed_patterns: pattern.append(self.RE_TEX_BLOCK) self.match = None if pattern: self.pattern = re.compile(r'(?s)^(?:%s)[ ]*$' % '|'.join(pattern)) else: self.pattern = None self.markdown = md BlockProcessor.__init__(self, md.parser)
def __init__(self, parser, config): BlockProcessor.__init__(self, parser) self.row_class = config["row_class"] Columns.noflow_cell_width_template = config[ CONFIG_CELL_NOFLOW_WIDTH_CLASS_TEMPLATE ] Columns.cell_width_template = config[CONFIG_CELL_WIDTH_CLASS_TEMPLATE]
def __init__(self, parser, md_globals): BlockProcessor.__init__(self, parser) self.md_globals = md_globals if "pvman" not in md_globals: md_globals['pvman'] = { 'svg_id': 0, 'template': self.loadTemplate() }
def __init__(self, md, graphviz=None, ext='svg', **kwargs): MooseMarkdownCommon.__init__(self, **kwargs) BlockProcessor.__init__(self, md) # Location of the graphviz self._graphviz = graphviz # Output extension self._ext = ext
def __init__(self, md, graphviz=None, ext='svg', **kwargs): MooseCommonExtension.__init__(self, **kwargs) BlockProcessor.__init__(self, md) # Location of the graphviz self._graphviz = graphviz # Output extension self._ext = ext
def __init__(self, parser, **kwargs): MooseCommonExtension.__init__(self, **kwargs) BlockProcessor.__init__(self, parser) # The default settings self._settings = {'caption' : None, 'interval' : None, 'pause' : None, 'wrap' : None, 'keyboard' : None}
def __init__(self, parser, md, configs): BlockProcessor.__init__(self, parser) self.md = md self.configs = configs self.processors = (FigureParser(configs["IGNORING_IMG"]), EquationParser(), CodeParser(md), TableParser(), VideoParser(), QuoteParser()) self.RE = re.compile( ur'(^|(?<=\n))((?P<typelegend>Figure|Table|Code|Equation|Video|Source)\s?)*\:\s?(?P<txtlegend>.*?)(\n|$)' )
def __init__(self, parser): BlockProcessor.__init__(self, parser) exprs = (("->", "right"), ("<-", "center")) self.REStart = re.compile(r'(^|\n)' + re.escape('->')) self._ending_re = [ re.compile(re.escape(end_expr) + r'(\n|$)') for end_expr, _ in exprs ] self._kind_align = [kind_align for _, kind_align in exprs]
def __init__(self, parser, root=None, **kwargs): MooseCommonExtension.__init__(self) BlockProcessor.__init__(self, parser, **kwargs) self._root = os.path.join(root, 'docs/media') # The default settings self._settings = {'caption' : None, 'interval' : None, 'pause' : None, 'wrap' : None, 'keyboard' : None}
def __init__(self, parser, md, configs): BlockProcessor.__init__(self, parser) self.md = md self.configs = configs self.processors = ( FigureParser(configs["IGNORING_IMG"]), EquationParser(), CodeParser(md), TableParser(), VideoParser(), QuoteParser()) self.RE = re.compile(r'(^|(?<=\n))((?P<typelegend>Figure|Table|Code|Equation|Video|Source)\s?)*\:\s?(?P<txtlegend>.*?)(\n|$)')
def __init__(self, pattern, config, latex2svg, md): """Initialize.""" self.display_class = config.get('display_class', '') self.latex2svg = latex2svg self.md = md self.checked_for_deps = False self.use_attr_list = False # will be set in run(), we'll know all extensions have been initialized by then self.match = None self.pattern = re.compile(pattern) BlockProcessor.__init__(self, md.parser)
def __init__(self, parser, root=None, **kwargs): MooseCommonExtension.__init__(self) BlockProcessor.__init__(self, parser, **kwargs) self._root = os.path.join(root, 'docs/media') # The default settings self._settings = { 'caption': None, 'interval': None, 'pause': None, 'wrap': None, 'keyboard': None }
def __init__(self, pattern, config, md): """Initialize.""" # Generic setup self.generic = config.get('generic', False) wrap = config.get('tex_block_wrap', ['\\[', '\\]']) self.wrap = wrap[0] + '%s' + wrap[1] # Default setup self.preview = config.get('preview', False) self.match = None self.pattern = re.compile(pattern) BlockProcessor.__init__(self, md.parser)
def __init__(self, pattern, config, md): """Initialize.""" # Generic setup self.generic = config.get('generic', False) wrap = config.get('tex_block_wrap', ['\\[', '\\]']) self.wrap = (wrap[0].replace('{', '}}').replace('}', '}}') + '{}' + wrap[1].replace('{', '}}').replace('}', '}}')) self.block_tag = config.get('block_tag', 'div') # Default setup self.preview = config.get('preview', False) self.match = None self.pattern = re.compile(pattern) BlockProcessor.__init__(self, md.parser)
def __init__(self, config, md): """Initialize.""" self.script = config.get('insert_as_script', False) wrap = config.get('tex_block_wrap', ['\\[', '\\]']) self.wrap = wrap[0] + '%s' + wrap[1] allowed_patterns = set(config.get('block_syntax', ['dollar', 'square', 'begin'])) pattern = [] if 'dollar' in allowed_patterns: pattern.append(self.RE_DOLLAR_BLOCK) if 'square' in allowed_patterns: pattern.append(self.RE_BRACKET_BLOCK) if 'begin' in allowed_patterns: pattern.append(self.RE_TEX_BLOCK) self.match = None if pattern: self.pattern = re.compile(r'(?s)^(?:%s)[ ]*$' % '|'.join(pattern)) else: self.pattern = None self.markdown = md BlockProcessor.__init__(self, md.parser)
def __init__(self, parser, **kwargs): MooseCommonExtension.__init__(self, **kwargs) BlockProcessor.__init__(self, parser)
def __init__(self, parser, pack): BlockProcessor.__init__(self, parser) self._pack = pack self._first = True
def __init__(self, parser, **kwargs): MooseMarkdownCommon.__init__(self, **kwargs) BlockProcessor.__init__(self, parser)
def __init__(self, parser, md_globals): BlockProcessor.__init__(self, parser) self.md_globals = md_globals if "pvman" not in md_globals: md_globals['pvman'] = {'svg_id': 0, 'template': self.loadTemplate()}
def __init__(self, *args, **kwargs): self._last_parent = None BlockProcessor.__init__(self, *args, **kwargs)
def __init__(self, parser): BlockProcessor.__init__(self, parser) self.re = re.compile(r'(?:^|\n)\$\$.+\$\$(\n|$)', re.DOTALL | re.MULTILINE | re.UNICODE)
def __init__(self, parser, pack): BlockProcessor.__init__(self, parser) self.pack = pack
def __init__(self, parser): BlockProcessor.__init__(self, parser) md = parser.markdown if not hasattr(md, 'Meta'): setattr(md, 'Meta', MetaDict())
def __init__(self, configs, *args, **kwargs): self.configs = dict(configs) BlockProcessor.__init__(self, *args, **kwargs) # LaTeX preamble self.preamble = ""
def __init__(self, md_parser, config): """Class initialization""" self.config = config BlockProcessor.__init__(self, md_parser)
def __init__(self, parser): self.border = False self.separator = '' BlockProcessor.__init__(self, parser)
def __init__(self, parser,repart, classType): BlockProcessor.__init__(self,parser) self.classType = classType self.RE = re.compile( r'(?:^|\n)\[\[' + repart + r'\]\](\n|$)')
def __init__(self, parser, cls=None): BlockProcessor.__init__(self, parser) self.cls = cls
def __init__(self, md, section_cls='section'): self.section_cls = section_cls BlockProcessor.__init__(self, md)
def __init__(self, markdown_instance=None, **kwargs): MooseMarkdownCommon.__init__(self, **kwargs) BlockProcessor.__init__(self, markdown_instance.parser) self.markdown = markdown_instance
def __init__(self, parser, startExpr, endExpr, contentAlign): BlockProcessor.__init__(self, parser) self.REStart = re.compile(r'(^|\n)' + re.escape(startExpr)) self.REEnd = re.compile(re.escape(endExpr) + r'(\n|$)') self.contentAlign = contentAlign
def __init__(self, parser, md): BlockProcessor.__init__(self, parser) self.md = md self.RE = re.compile(r'(^|\n)((?P<typelegend>Figure|Table|Code|Equation|Video|Source)[ ]{0,1})*\:[ ]{0,1}(?P<txtlegend>.*?)(\n|$)')
def __init__(self, md, patt, width, height): BlockProcessor.__init__(self, md.parser) self.md = md self.width = width self.height = height self.RE = re.compile(patt)
def __init__(self, parser): BlockProcessor.__init__(self,parser) self.nested_proofs = 0
def __init__(self, parser, repart, classType): BlockProcessor.__init__(self, parser) self.classType = classType self.RE = re.compile(r'(?:^|\n)\[\[' + repart + r'\]\](\n|$)')
def __init__(self, parser, md): BlockProcessor.__init__(self, parser) self.md = md self.RE = re.compile( r'(^|\n)((?P<typelegend>Figure|Table|Code|Equation|Video|Source)[ ]{0,1})*\:[ ]{0,1}(?P<txtlegend>.*?)(\n|$)' )
def __init__(self, md): """Initialize.""" BlockProcessor.__init__(self, md.parser) self.markdown = md
def __init__(self, parser, num_root): #super(MyBlockParser, self).__init__(parser) BlockProcessor.__init__(self, parser) self.num_current = num_root self.num_root_depth = len(num_root)