can't we do the same with:

```javascript
return (/(?:^\.|\.\.)/.test(linkSpec.match[2]);
```
(of course you would create a regexp const earlier in the file so that you can reuse it)