Add prettier

This commit is contained in:
Ken-Håvard Lieng 2018-04-06 01:46:22 +02:00
parent 0cbbc1b8ff
commit b176b79144
46 changed files with 832 additions and 544 deletions

View file

@ -30,12 +30,19 @@ export default function linkify(text) {
}
result.push(
<a target="_blank" rel="noopener noreferrer" href={match.getAnchorHref()}>
<a
target="_blank"
rel="noopener noreferrer"
href={match.getAnchorHref()}
>
{match.matchedText}
</a>
);
} else if (typeof result[result.length - 1] === 'string') {
result[result.length - 1] += text.slice(pos, match.offset + match.matchedText.length);
result[result.length - 1] += text.slice(
pos,
match.offset + match.matchedText.length
);
} else {
result.push(text.slice(pos, match.offset + match.matchedText.length));
}