A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pypi.python.org/pypi/paka.cmark below:

paka.cmark · PyPI

paka.cmark is a Python library that wraps subset of cmark C library (that is one of reference implementations of CommonMark).

Features Examples
>>> from paka import cmark

Render with CMARK_OPT_DEFAULT | CMARK_OPT_NOBREAKS:

>>> print(cmark.to_html(u"<p>nope</p>"))
<!-- raw HTML omitted -->

Render with CMARK_OPT_DEFAULT | CMARK_OPT_NOBREAKS | CMARK_OPT_UNSAFE:

>>> print(cmark.to_html(u"Hello,\n*World*!", safe=False))
<p>Hello, <em>World</em>!</p>

Render with CMARK_OPT_DEFAULT:

>>> print(cmark.to_html(u"Hello,\n*World*!", breaks=True))
<p>Hello,
<em>World</em>!</p>

Render with CMARK_OPT_DEFAULT | CMARK_OPT_HARDBREAKS:

>>> print(cmark.to_html(u"Hello,\n*World*!", breaks="hard"))
<p>Hello,<br />
<em>World</em>!</p>

Render CommonMark with CMARK_OPT_DEFAULT | CMARK_OPT_NOBREAKS:

>>> print(cmark.to_commonmark(u"_Hello_"))
*Hello*
Installation

Library is available on PyPI, you can use pip for installation:

$ pip install paka.cmark
Getting documentation

Build HTML docs:

$ tox -e docs

View built docs:

$ sensible-browser .tox/docs/tmp/docs_html/index.html
Running tests
$ tox
Getting coverage

Collect info:

$ tox -e coverage

View HTML report:

$ sensible-browser .tox/coverage/tmp/cov_html/index.html
Checking code style

Run code checkers:

$ tox -e checks

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4