Skip to content

Commit 8a58bd3

Browse files
committed
fix cornerExternalLinkTarget.
1 parent fa14210 commit 8a58bd3

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Diff for: docs/configuration.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ window.$docsify = {
102102

103103
Determines if Docsify should handle uncaught _synchronous_ plugin errors automatically. This can prevent plugin errors from affecting docsify's ability to properly render live site content.
104104

105-
## cornerExternalLinkTarget
105+
## cornerExternalLinkTargett
106106

107107
- Type: `String`
108108
- Default: `'_blank'`
@@ -111,7 +111,7 @@ Target to open external link at the top right corner. Default `'_blank'` (new wi
111111

112112
```js
113113
window.$docsify = {
114-
cornerExternalLinkTarget: '_self', // default: '_blank'
114+
cornerExternalLinkTargett: '_self', // default: '_blank'
115115
};
116116
```
117117

Diff for: src/core/config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function (vm) {
1010
autoHeader: false,
1111
basePath: '',
1212
catchPluginErrors: true,
13-
cornerExternalLinkTarget: '_blank',
13+
cornerExternalLinkTargett: '_blank',
1414
coverpage: '',
1515
crossOriginLinks: [],
1616
el: '#app',

Diff for: src/core/render/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export function Render(Base) {
413413

414414
if (el) {
415415
if (config.repo) {
416-
html += tpl.corner(config.repo, config.cornerExternalLinkTarge);
416+
html += tpl.corner(config.repo, config.cornerExternalLinkTarget);
417417
}
418418

419419
if (config.coverpage) {

Diff for: src/core/render/tpl.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* Render github corner
33
* @param {Object} data URL for the View Source on Github link
4-
* @param {String} cornerExternalLinkTarge value of the target attribute of the link
4+
* @param {String} cornerExternalLinkTarget value of the target attribute of the link
55
* @return {String} SVG element as string
66
*/
7-
export function corner(data, cornerExternalLinkTarge) {
7+
export function corner(data, cornerExternalLinkTarget) {
88
if (!data) {
99
return '';
1010
}
@@ -15,10 +15,10 @@ export function corner(data, cornerExternalLinkTarge) {
1515

1616
data = data.replace(/^git\+/, '');
1717
// Double check
18-
cornerExternalLinkTarge = cornerExternalLinkTarge || '_blank';
18+
cornerExternalLinkTarget = cornerExternalLinkTarget || '_blank';
1919

2020
return (
21-
`<a href="${data}" target="${cornerExternalLinkTarge}" class="github-corner" aria-label="View source on Github">` +
21+
`<a href="${data}" target="${cornerExternalLinkTarget}" class="github-corner" aria-label="View source on Github">` +
2222
'<svg viewBox="0 0 250 250" aria-hidden="true">' +
2323
'<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>' +
2424
'<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>' +

0 commit comments

Comments
 (0)