-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Description
I've made it so that if you start a link with \/, it opens it in a new tab. I've done this by adding the lines
if link[:2] == '\\/':
link = link[2:]
newtab = True
else:
newtab = False
and then the lines
if not newtab:
b = b[:m.start()] + r'<a href=\"%s\">%s<\/a>' % (link, linkname) + b[m.end():]
else:
b = b[:m.start()] + r'<a rel=\"noopener noreferrer\" target=\"_blank\" href=\"%s\">%s<\/a>' % (link, linkname) + b[m.end():]
to the replacelinks function which seems to work well.
What do you think about adding this to master? What would be a good way to signify new tab?
Metadata
Metadata
Assignees
Labels
No labels