mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix bug with priority
This commit is contained in:
+2
-6
@@ -118,17 +118,13 @@ export class Linkifier {
|
||||
}
|
||||
|
||||
for (let i = this._linkMatchers.length - 1; i >= 0; i--) {
|
||||
if (matcher.priority === this._linkMatchers[i].priority) {
|
||||
if (matcher.priority <= this._linkMatchers[i].priority) {
|
||||
this._linkMatchers.splice(i + 1, 0, matcher);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (matcher.priority > this._linkMatchers[0].priority) {
|
||||
this._linkMatchers.splice(0, 0, matcher);
|
||||
} else {
|
||||
this._linkMatchers.push(matcher);
|
||||
}
|
||||
this._linkMatchers.splice(0, 0, matcher);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user