INNER CODE UNIT · JavaScript
regex
MassiveHeights/Black · scripts/docs.js:708
let regex = new RegExp(/{@link\s(.+?)(#|\|)(.+?)}/g);
let m;
while ((m = regex.exec(desc)) !== null) {
if (m[2] === '#') {
desc = desc.replace(m[0], `<a href="${this.getClassPath(m[1])}#${m[3]}" class="method-name">${m[1]}.${m[3]}</a>`);
}
}
return desc;
}
getClassPath(className) {
let p = `${BASE_URL}`;
let type = this.seekClass(className);
if (!type)
return p;