Author
|
zPlus <zplus@peers.community>
2019-02-15 20:40:26
|
Committer
|
zPlus <zplus@peers.community>
2019-02-15 20:40:26
|
Commit
|
bea1b44
(patch)
|
Tree
|
0234ce4
|
Parent(s)
|
|
Fix #83 convert text URLs to links.
commits diff:
9358dda..bea1b44
1 file changed,
2 insertions,
2 deletions
—
download
Diffstat
Diff options
+2/-2
M freepost/__init__.py
38
|
38
|
|
'md2txt': lambda text: bleach.clean (markdown.markdown (text),
|
39
|
39
|
|
tags=[], attributes={}, styles=[], strip=True),
|
40
|
40
|
|
# Convert markdown to html
|
41
|
|
- |
'md2html': lambda text: bleach.clean (markdown.markdown (
|
|
41
|
+ |
'md2html': lambda text: bleach.clean (bleach.linkify (markdown.markdown (
|
42
|
42
|
|
text,
|
43
|
43
|
|
# https://python-markdown.github.io/extensions/
|
44
|
44
|
|
extensions=[ 'extra', 'admonition', 'nl2br', 'smarty' ],
|
45
|
|
- |
output_format='html5')),
|
|
45
|
+ |
output_format='html5'))),
|
46
|
46
|
|
# Get the domain part of a URL
|
47
|
47
|
|
'netloc': lambda url: urlparse (url).netloc
|
48
|
48
|
|
},
|