We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 191e390 commit 0776c80Copy full SHA for 0776c80
tools/doc/type-parser.js
@@ -58,6 +58,8 @@ const typeMap = {
58
'URLSearchParams': 'url.html#url_class_urlsearchparams'
59
};
60
61
+const arrayPart = /(?:\[])+$/;
62
+
63
module.exports = {
64
toLink: function(typeInput) {
65
const typeLinks = [];
@@ -69,12 +71,10 @@ module.exports = {
69
71
if (typeText) {
70
72
let typeUrl = null;
73
- // To support type[], we store the full string and use
- // the bracket-less version to lookup the type URL
74
+ // To support type[], type[][] etc., we store the full string
75
+ // and use the bracket-less version to lookup the type URL
76
const typeTextFull = typeText;
- if (/\[]$/.test(typeText)) {
- typeText = typeText.slice(0, -2);
77
- }
+ typeText = typeText.replace(arrayPart, '');
78
79
const primitive = jsPrimitives[typeText.toLowerCase()];
80
0 commit comments