How to use the panflute.run_filter function in panflute

To help you get started, we’ve selected a few panflute 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 chdemko / pandoc-latex-admonition / pandoc_latex_admonition.py View on Github external
def main(doc=None):
    """
    Main function called by the script.

    Arguments
    ---------
        doc:
            The pandoc document

    Returns
    -------
        The modified pandoc document
    """
    return run_filter(admonition, prepare=prepare, finalize=finalize, doc=doc)
github kiwi0fruit / pandoctools / pandoctools / language_prefix.py View on Github external
def main(doc=None):
    return pf.run_filter(action, doc=doc)
github kiwi0fruit / pandoctools / scripts / pandoc19_fix_html_indent.py View on Github external
def main(doc=None):
    return pf.run_filter(action, doc=doc)
github ickc / pantable / pantable / cli / pantable.py View on Github external
def main(doc=None):
    """
    Fenced code block with class table will be parsed using
    panflute.yaml_filter with the fuction codeblock_to_table above.
    """
    return panflute.run_filter(
        panflute.yaml_filter,
        tag='table',
        function=codeblock_to_table,
        strict_yaml=True,
        doc=doc
    )
github kiwi0fruit / knitty / knitty / pre_notedown.py View on Github external
def main(doc=None):
    if len(sys.argv) > 1:
        if sys.argv[1] == '--help' or sys.argv[1] == '-h':
            print(_help)
            return None
    return pf.run_filter(action, doc=doc)
github kiwi0fruit / knitty / knitty / self_contained_raw_html_img.py View on Github external
def main(doc=None):
    return pf.run_filter(action, doc=doc)
github kiwi0fruit / sugartex / sugartex / sugartex_pandoc_filter.py View on Github external
def main(doc=None):
    sugartex.ready()
    return pf.run_filter(action, doc=doc)
github ickc / pantable / pantable / pantable.py View on Github external
def main(doc=None):
    """
    Fenced code block with class table will be parsed using
    panflute.yaml_filter with the fuction convert2table above.
    """
    return panflute.run_filter(
        panflute.yaml_filter,
        tag='table',
        function=convert2table,
        strict_yaml=True,
        doc=doc
    )