Fix functions and certain characters as arguments

This commit is contained in:
GreenXenith 2021-06-12 14:25:12 -07:00
parent 8532671e1f
commit 61e90b9b6c
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -15,9 +15,9 @@ const objects = (entry, api) => {
const lookfor = name.match(/(?:\S+?\.)?([^\(]+)/)[1];
// The completed thing without namespaces and with argument tabstops if applicable
let i = 0;
const complete = name.match(/([^.]*)$/)[0].replace(/\(([^(]+)\)/, args => {
return args.replace(/(?! )[\w\- ]+/g, arg => `\${${++i}:${arg}}`);
}).replace(/(\(function\(.+)\)$/, `$1\n\t$${++i}\nend)`) + "$0";
const complete = name.match(/^(?:\w+\.)?(.*)$/)[1].replace(/\(([^(]+)\)/, args => {
return args.replace(/(?! )(?:\[, )?[\w\- .\]]+/g, arg => `\${${++i}:${arg}}`);
}).replace(/(\(function\(.+)\)$/, `$1\n\t$0\nend)`);
// Full method documentation
const doc = entry.match(/^\* ([\S\s]*?)\n*$/)[1].replace(/\n /g, "\n") + docLink(api, entry); // Remove extra indent
// Type of thing