[build] 4.2.0

This commit is contained in:
qingwei.li 2017-07-10 22:40:38 +08:00
commit 4dabae3bf2
No known key found for this signature in database
GPG key ID: B6DDC2F7AE80B2F4
5 changed files with 61 additions and 19 deletions

View file

@ -44,7 +44,7 @@ export class Compiler {
})
}
matchNotCompileLink(link) {
matchNotCompileLink (link) {
const links = this.config.noCompileLinks
for (var i = 0; i < links.length; i++) {
@ -96,9 +96,9 @@ export class Compiler {
renderer.link = function (href, title, text) {
let blank = ''
if (!/:|(\/{2})/.test(href)
&& !_self.matchNotCompileLink(href)
&& !/(\s?:ignore)(\s\S+)?$/.test(title)) {
if (!/:|(\/{2})/.test(href) &&
!_self.matchNotCompileLink(href) &&
!/(\s?:ignore)(\s\S+)?$/.test(title)) {
href = router.toURL(href, null, router.getCurrentPath())
} else {
blank = ` target="${linkTarget}"`