An open API service indexing awesome lists of open source software.

https://github.com/tylertemp/md-underline

underline plugin for python markdown
https://github.com/tylertemp/md-underline

Last synced: 3 months ago
JSON representation

underline plugin for python markdown

Awesome Lists containing this project

README

          

# md-underline

underline plugin for python markdown

## Summary

This will render `__content__` as underline format `content`

## Usage

```python
import markdown
from underline import UnderlineExtension
markdown.markdown('__underline__', extensions=[UnderlineExtension()]
# underline
```

## Install

```bash
pip install get+git://github.com/TylerTemp/md-underline.git
```

## API

`UnderlineExtension` accepts:

1. `tag`: html tag name. use `u` by default

2. `cls`: add class to the underline element. Default: `''`

e.g.

```python
import markdown
from underline import UnderlineExtension
markdown.markdown(
'__underline__',
extensions=[UnderlineExtension(tag='strong', cls='under')]
# underline
```

Note: it's strongly suggest using css to change the style instead of using `` tag
because markdown is not designed for the style.

## Example

`__under__` -> `under`
`__*em*under__` -> `emunder`
`__*underem*__` -> `underem`

## Note

This plugin only work on:

1. underline alone, or combine with em. Won't work on ***__combine-3__***
2. When conbine with em, em can only use *, thus ___underline-with-em___
won't work