Merge pull request #2121 from tannewt/markdown_autolink

Add support for converting autolinks to BBCode
This commit is contained in:
Scott Shawcroft 2019-09-05 11:28:24 -07:00 committed by GitHub
commit 5e754f1694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)