Link patching now picks up multiple in single line (#5163)

This commit is contained in:
Anže Vodovnik 2021-01-28 01:21:27 +01:00 committed by GitHub
parent 321a873d8a
commit f2ef7f51b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -612,7 +612,7 @@ function patchLinks(spec, classesMap, membersMap, linkRenderer) {
if (p1 === 'option')
return linkRenderer({ option: p2 }) || match;
});
node.text = node.text.replace(/\[([\w]+)\]/, (match, p1) => {
node.text = node.text.replace(/\[([\w]+)\]/g, (match, p1) => {
const clazz = classesMap.get(p1);
if (clazz)
return linkRenderer({ clazz }) || match;