|
@@ -2598,7 +2598,9 @@ showdown.subParser('anchors', function (text, options, globals) {
|
|
result += ' title="' + title + '"';
|
|
result += ' title="' + title + '"';
|
|
}
|
|
}
|
|
|
|
|
|
- if (options.openLinksInNewWindow) {
|
|
|
|
|
|
+ // optionLinksInNewWindow only applies
|
|
|
|
+ // to external links. Hash links (#) open in same page
|
|
|
|
+ if (options.openLinksInNewWindow && !/^#/.test(url)) {
|
|
// escaped _
|
|
// escaped _
|
|
result += ' target="¨E95Eblank"';
|
|
result += ' target="¨E95Eblank"';
|
|
}
|
|
}
|