From 54cc5f939b9499ae56604f589eef4e3f1c13cdc5 Mon Sep 17 00:00:00 2001 From: Koy Zhuang Date: Sat, 4 Jun 2022 23:16:52 +0800 Subject: [PATCH] fix: cornerExternalLinkTarget config. (#1814) --- src/core/render/index.js | 2 +- src/core/render/tpl.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/render/index.js b/src/core/render/index.js index 4f4a6da3e..cfd790441 100644 --- a/src/core/render/index.js +++ b/src/core/render/index.js @@ -413,7 +413,7 @@ export function Render(Base) { if (el) { if (config.repo) { - html += tpl.corner(config.repo, config.cornerExternalLinkTarge); + html += tpl.corner(config.repo, config.cornerExternalLinkTarget); } if (config.coverpage) { diff --git a/src/core/render/tpl.js b/src/core/render/tpl.js index 595cdff76..47ceeab74 100644 --- a/src/core/render/tpl.js +++ b/src/core/render/tpl.js @@ -1,10 +1,10 @@ /** * Render github corner * @param {Object} data URL for the View Source on Github link - * @param {String} cornerExternalLinkTarge value of the target attribute of the link + * @param {String} cornerExternalLinkTarget value of the target attribute of the link * @return {String} SVG element as string */ -export function corner(data, cornerExternalLinkTarge) { +export function corner(data, cornerExternalLinkTarget) { if (!data) { return ''; } @@ -15,10 +15,10 @@ export function corner(data, cornerExternalLinkTarge) { data = data.replace(/^git\+/, ''); // Double check - cornerExternalLinkTarge = cornerExternalLinkTarge || '_blank'; + cornerExternalLinkTarget = cornerExternalLinkTarget || '_blank'; return ( - `` + + `` + '