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

Add type_doc to frontend (resolves #115)

parent 54cd291c
Subproject commit dbef6e96ac85e3dfbcf3989a589af1593c9f88d6
Subproject commit 7a9bba20fb4cd5c4dbbf94a722ddf37a055dbd59
......@@ -380,8 +380,14 @@ function getResults(str, libs, include_builtins, include_core, page) {
break;
}
return makeGenericResultHTML(basic, meta, hidden,
highlightFunction(extra['func'], highlightCallback, hl_entry));
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;
}
return makeGenericResultHTML(basic, meta, hidden, code);
case 'TypeResult':
if (extra['type_instances'].length > 0) {
......
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