diff --git a/themes/vue/source/js/common.js b/themes/vue/source/js/common.js
index 9ba7686c81..8c970ad052 100644
--- a/themes/vue/source/js/common.js
+++ b/themes/vue/source/js/common.js
@@ -14,8 +14,9 @@
var apiTitles = [].slice.call(apiContent.querySelectorAll('h3'))
apiTitles.forEach(function (titleNode) {
var methodMatch = titleNode.textContent.match(/^([^(]+)\(/)
+ var idWithoutArguments = slugize(titleNode.textContent)
if (methodMatch) {
- var idWithoutArguments = slugize(methodMatch[1])
+ idWithoutArguments = slugize(methodMatch[1])
titleNode.setAttribute('id', idWithoutArguments)
titleNode.querySelector('a').setAttribute('href', '#' + idWithoutArguments)
}
@@ -307,8 +308,13 @@
return ''
}
}).join('').replace(/\(.*\)$/, '')
+ var methodMatch = h.textContent.match(/^([^(]+)\(/)
+ var idWithoutArguments = slugize(h.textContent)
+ if (methodMatch) {
+ idWithoutArguments = slugize(methodMatch[1])
+ }
link.innerHTML =
- '' +
+ '' +
htmlEscape(text) +
''
return link