提交 dd737b0b 编写于 作者: I isidor

handleLinks: guard against bad uris

fixes #5594
上级 3e7712b1
......@@ -338,8 +338,12 @@ export class ReplExpressionsRenderer implements tree.IRenderer {
for (let pattern of ReplExpressionsRenderer.FILE_LOCATION_PATTERNS) {
pattern.lastIndex = 0; // the holy grail of software development
var match = pattern.exec(text);
var resource = match && URI.file(match[1]);
const match = pattern.exec(text);
let resource = null;
try {
resource = match && URI.file(match[1]);
} catch (e) { }
if (resource) {
linkContainer = document.createElement('span');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册