Module

plugins.autolinks

Autolinks plugin for Patitas.

Adds support for automatic URL and email detection.

Usage:

>>> md = create_markdown(plugins=["autolinks"])
>>> md("Visit https://example.com for more info.")
'<p>Visit <a href="https://example.com">https://example.com</a> for more info.</p>'

Syntax:

URLs are automatically linked:

  • http://example.com
  • https://example.com
  • www.example.com

Emails are automatically linked:

  • user@example.com

Explicit autolinks (CommonMark):

Notes:

  • URLs in code spans are not autolinked
  • URLs in explicit links are not double-linked
  • Trailing punctuation is handled smartly

Thread Safety:

This plugin is stateless and thread-safe.

Classes

AutolinksPlugin 1
Plugin for automatic URL and email linking. Extends inline parsing to detect URLs and emails witho…

Plugin for automatic URL and email linking.

Extends inline parsing to detect URLs and emails without explicit markdown link syntax.

Enable via Markdown(plugins=["autolinks"]).

Note: The actual parsing is controlled by ParseConfig.autolinks_enabled, which is set by the Markdown class based on the plugins list.

Methods

name 0 str
property
def name(self) -> str
Returns
str