Verified Commit aa5ee804 authored by Camil Staps's avatar Camil Staps 🚀

Don't show two types for macros with derived type and @type documentation field

parent 407a159c
......@@ -454,9 +454,12 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag
var code = highlightFunction(extra['func'], highlightCallback, hl_entry);
if ('type_doc' in extra) {
var name = extra['func'].split(' ')[0];
var type = highlightFunction(name + ' :: ' + extra['type_doc'], highlightCallback);
code = type + '\r\n' + code;
var lines = extra['func'].split('\n');
if (lines.length <= 1 && lines[0].indexOf(' :: ') == -1) {
var name = extra['func'].split(' ')[0];
var type = highlight(name + ' :: ' + extra['type_doc'], highlightCallback);
code = type + '\r\n' + code;
}
}
return makeGenericResultHTML(basic, meta, hidden, code);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment