diff --git a/src/blog.rs b/src/blog.rs index ab66bd9..7ae4264 100644 --- a/src/blog.rs +++ b/src/blog.rs @@ -256,6 +256,10 @@ impl PostContentCache { let regex_code = RegExp::new("
", "ig");
let js_html = js_html.replace_by_pattern(®ex_code, "");
+ // Transform all non-self-refernece links (does not start with "#") to target="_blank"
+ let regex_links = RegExp::new("", "ig");
+ let js_html = js_html.replace_by_pattern(®ex_links, "");
+
js_html.into()
}