How to use the creoleparser.core.Parser function in Creoleparser

To help you get started, we’ve selected a few Creoleparser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sfu-fas / coursys / courselib / markup.py View on Github external
            @property
            def inline_elements(self):
                inline = super(CreoleDialect, self).inline_elements
                inline.append(self.abbracronym)
                inline.append(self.strikethrough)
                inline.append(self.htmlentity)
                return inline

            @property
            def block_elements(self):
                blocks = super(CreoleDialect, self).block_elements
                blocks.insert(0, self.codeblock)
                return blocks

        self.parser = creoleparser.core.Parser(CreoleDialect)
        self.text2html = self.parser.render
github sfu-fas / coursys / pages / models.py View on Github external
            @property
            def inline_elements(self):
                inline = super(CreoleDialect, self).inline_elements
                inline.append(self.abbracronym)
                inline.append(self.strikethrough)
                inline.append(self.htmlentity)
                return inline

            @property
            def block_elements(self):
                blocks = super(CreoleDialect, self).block_elements
                blocks.insert(0, self.codeblock)
                return blocks
        
        self.parser = creoleparser.core.Parser(CreoleDialect)
        self.text2html = self.parser.render
github ilblackdragon / django-blogs / blog / templatetags / creole.py View on Github external
def creole(text, **kw):
    """Returns the text rendered by the Creole markup.
    """
    if Creole is None and settings.DEBUG:
        raise template.TemplateSyntaxError("Error in creole filter: "
            "The Creole library isn't installed, try easy_install Creoleparser.")
    parser = CreoleParser(dialect=dialect)
    return parser.render(text)
github pinax / pinax / pinax / apps / blog / templatetags / creole.py View on Github external
def creole(text, **kw):
    """Returns the text rendered by the Creole markup.
    """
    if Creole is None and settings.DEBUG:
        raise template.TemplateSyntaxError("Error in creole filter: "
            "The Creole library isn't installed, try easy_install Creoleparser.")
    parser = CreoleParser(dialect=dialect)
    return parser.render(text)
github brosner / django-wikiapp / wiki / templatetags / wiki_markup.py View on Github external
def creole(text, **kw):
    """Returns the text rendered by the Creole markup.
    """
    if Creole is None and settings.DEBUG:
        raise template.TemplateSyntaxError("Error in creole filter: "
            "The Creole library isn't installed, try easy_install Creoleparser.")
    parser = CreoleParser(dialect=dialect)
    return parser.render(text)