markdown-image-titles

Adds titles to Markdown images. The title text is taken from the ALT text of the image.


Keywords
markdown, image, title
License
MIT
Install
pip install markdown-image-titles==0.1.0

Documentation

markdown-image-titles

Adds titles to Markdown images. The title text is taken from the alt text of the image.

Normally, the syntax for adding images in Markdown is like this:

![Alt text](assets/images/my-image.png "My title")

However, entering both the alt text and the title can be cumbersome.

With this extension, if no title is given, the alt text will automatically used as the title.

Example

![Image description](assets/images/my-image.png)

becomes

<img alt="Image description" src="assets/images/my-image.png" title="Image description" />

Usage

pip install markdown-image-titles
md = markdown.Markdown(
    extensions=[
        'image_titles',
        'attr_list' # optional
    ]
)