feat(compiler): support for setting target attribute for link, fixed #230
This commit is contained in:
parent
c3a149679a
commit
7f270f93c6
4 changed files with 28 additions and 0 deletions
|
|
@ -105,6 +105,13 @@ export class Compiler {
|
|||
title = title && title.replace(/:ignore/g, '').trim()
|
||||
}
|
||||
|
||||
let target = title && title.match(/:target=\w+/)
|
||||
if (target) {
|
||||
target = target[0]
|
||||
title = title.replace(target, '')
|
||||
blank = ' ' + target.slice(1)
|
||||
}
|
||||
|
||||
if (title) {
|
||||
title = ` title="${title}"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue