Merge pull request #2121 from tannewt/markdown_autolink
Add support for converting autolinks to BBCode
This commit is contained in:
commit
5e754f1694
@ -31,6 +31,11 @@ class AdafruitBBCodeRenderer:
|
|||||||
def link(self, link, title, text):
|
def link(self, link, title, text):
|
||||||
return "[url={}]{}[/url]".format(link, text)
|
return "[url={}]{}[/url]".format(link, text)
|
||||||
|
|
||||||
|
def autolink(self, link, is_email):
|
||||||
|
if not is_email:
|
||||||
|
return "[url={}]{}[/url]".format(link, link)
|
||||||
|
return link
|
||||||
|
|
||||||
def header(self, text, level, raw):
|
def header(self, text, level, raw):
|
||||||
return "[b][size=150]{}[/size][/b]\n".format(text)
|
return "[b][size=150]{}[/size][/b]\n".format(text)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user