Add support for converting autolinks to BBCode

This commit is contained in:
Scott Shawcroft 2019-09-04 17:15:30 -07:00
parent fca440fb66
commit dab345ce58
No known key found for this signature in database
GPG Key ID: 9349BC7E64B1921E
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ class AdafruitBBCodeRenderer:
def link(self, link, title, 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):
return "[b][size=150]{}[/size][/b]\n".format(text)