Modify markdown to include "target='_blank'" for all inline links starting with "http". This will let us

get rid of inline <a .. /> anchors to do this and use normal markdown link syntax.
This commit is contained in:
Tom Mortensen
2023-08-31 12:00:12 -07:00
parent b3d974d86d
commit c37fbc7b07
@@ -924,6 +924,9 @@ class MarkdownExtra extends \Michelf\Markdown {
$title = $this->encodeAttribute($title);
$result .= " title=\"$title\"";
}
// limetech - if URL starts with "http" then open in new tab/window
if (str_starts_with($url, "http"))
$result .= " target='_blank'";
$result .= $attr;
$link_text = $this->runSpanGamut($link_text);