Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Link recognition for Python Markdown

Project Description
# Mdx Linkify


This extension for [Python Markdown](
will convert text that look like links to HTML anchors.

There's an alternative package that serves the same purpose called
[`markdown-urlize`]( The main
difference is that [`mdx_linkify`]( is
utilizing the excellent [`bleach`]( for
searching links in text. :clap:

## Usage

### Minimal Example

from markdown import markdown

markdown("minimal", extensions=["mdx_linkify"])
# Returns '<p>minimal <a href=""></a></p>'

### Linkify Callbacks

It's possible to omit links that match your custom filter with linkify

For example, to omit links that end with `.txt` extension:

from mdx_linkify.mdx_linkify import LinkifyExtension
from markdown import Markdown

def dont_linkify_txt_extension(attrs, new=False):
if attrs["_text"].endswith(".txt"):
return None

return attrs

md = Markdown(
"linkify": {
"linkify_callbacks": [[dont_linkify_txt_extension], ""]

assert md.convert("not_link.txt"), '<p>not_link.txt</p>'

expected = md.convert("")
actual = '<p><a href=""></a></p>'
assert expected == actual

## Installation

The project is [on PyPI](!

pip install mdx_linkify

If you want the bleeding-edge version (this includes unreleased-to-PyPI code),
you can always grab the master branch directly from Git.

pip install git+git://

## Development

git clone
virtualenv mdx_linkify/
cd mdx_linkify/
source bin/activate
python install
python test

Pull requests are much welcome! :+1:

## Releasing

_(more like a cheatsheet for me actually)_

* Change version in ``,
* Commit and tag it,
* Push it (including tag),
* Run `python register && python sdist upload`;
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mdx_linkify-1.0.tar.gz (3.2 kB) Copy SHA256 Checksum SHA256 Source Jul 10, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting