Update note-mixin.ts

This commit is contained in:
syuilo 2018-11-25 04:30:32 +09:00
parent 5e54751bd4
commit 02b07c1b5b
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ export default (opts: Opts = {}) => ({
urls(): string[] { urls(): string[] {
if (this.appearNote.text) { if (this.appearNote.text) {
const ast = parse(this.appearNote.text); const ast = parse(this.appearNote.text);
// TODO: 再帰的にURL要素がないか調べる
return unique(ast return unique(ast
.filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent)) .filter(t => ((t.name == 'url' || t.name == 'link') && t.props.url && !t.silent))
.map(t => t.props.url)); .map(t => t.props.url));