Metadata-Version: 2.1
Name: Flask-Commonmark
Version: 1.0.1
Summary: Add commonmark processing filter to your Flask app.
Home-page: https://gitlab.com/doug.shawhan/flask-commonmark
Author: Doug Shawhan
Author-email: doug.shawhan@gmail.com
Maintainer: Doug Shawhan
Maintainer-email: doug.shawhan@gmail.com
License: Copyright 2019 Doug Shawhan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
        
Project-URL: Bug Tracker, https://gitlab.com/doug.shawhan/flask-commonmark/issues
Project-URL: Source Code, https://gitlab.com/doug.shawhan/flask-commonmark/tree/master
Project-URL: Development Version, https://gitlab.com/doug.shawhan/flask-commonmark/tree/dev
Project-URL: Documentation, https://flask-commonmark.readthedocs.io
Description: # flask-commonmark
        
        Add [CommonMark](https://commonmark.org/) processing [filter](http://jinja.pocoo.org/docs/2.10/templates/#filters) to your `Flask` app.
        
        One may notice a similarity to Dan Colish's `Flask-Markdown`, from which I shamelessly copied a bunch of this. Does not have all the nice provisions for extension baked in, but probably does what you need.
        
        Source code may be found at [Gitlab](https://gitlab.com/doug.shawhan/flask-commonmark).
        
        Docs at [readthedocs](https://flask-commonmark.readthedocs.io).
        
        # Installation
        
        ```bash
        pip install Flask-Commonmark
        ```
        
        If `pip` is not available on your system, use:
        
        ```bash
        easy_install Flask-Commonmark
        ```
        
        # Usage
        
        ## Script
        
        ```python
        from flask_commonmark import Commonmark
        cm = Commonmark(app)
        ```
        
        or, if you are using factory pattern:
        
        ```python
        cm = Commonmark()
        cm.init_app(app)
        ```
        
        Create routes in the usual way:
        ```python
        @app.route("/commonmark")
        def display_commonmark():
            mycm = u"Hello, *commonmark* block."
            return render_template("commonmark.html", mycm=mycm) 
        ```
        
        ## Template
        
        ### Inline-style
        ```html
        <html>
        {{mycm|commonmark}}
        </html>
        ```
        
        ### Block-style
        ```html
        <html>
        {% filter commonmark %}
        {{mycm}}
        {% endfilter %}
        </html>
        ```
        
        ## Autoescape
        
        Jinja2's autoescape works as expected. See [tests](https://gitlab.com/doug.shawhan/flask-commonmark/blob/master/tests/test_commonmark.py) for examples.
        
        ## Tests
        
        `python setup.py test` or `nosetests`
        
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Flask
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
