A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/kostyachum/python-markdown-plain-text below:

kostyachum/python-markdown-plain-text: Plain Text Extension for Python Markdown

python-markdown-plain-text

Plain Text Extension for Python Markdown

Renders Markdown a document as plain text without a need to render it into HTML and strip all the tags after. This allows you to save some work and dependencies such as Bleach or BeautifulSoup.

using pip

pip install -e "git+https://github.com/kostyachum/python-markdown-plain-text.git#egg=plain-text-markdown-extention"

Just use it as an extension

from markdown_plain_text.extention import PlainTextExtension
from markdown import Markdown

...
plain_text = Markdown(extensions=[PlainTextExtension()]).convert(mardown_text)
...

Or use a shortcut method:

from markdown_plain_text.extention import convert_to_plain_text

...
plain_text = convert_to_plain_text(mardown_text)
...
  1. Fork and create a branch
  2. pip install .
  3. do the changes
  4. python -m unittest
  5. Create a Pull-Request

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