Verified Commit fc6e0902 authored by Camil Staps's avatar Camil Staps 🐾

Resolve #194: show documentation of class members

parent 866f8e74
Subproject commit 011c4de38e8239572e3e32131818484b107981fc
Subproject commit 238392d49c0f03f43a08ba7c73a77610a26c74c4
......@@ -4,10 +4,10 @@ DB=types.json
MAN:=builddb.1 # Others don't have --help/--version # $(addsuffix .1,$(BIN))
CLM:=clm
CLMFLAGS:=-h 250M -nr -nortsopts\
-I $$CLEAN_HOME/lib/ArgEnv\
-I $$CLEAN_HOME/lib/TCPIP\
-I $$CLEAN_HOME/lib/Platform\
-I $$CLEAN_HOME/lib/Platform/Deprecated/StdLib\
-IL TCPIP\
-IL Platform\
-IL Platform/Deprecated/ArgEnv\
-IL Platform/Deprecated/StdLib\
-I Cloogle\
-I Cloogle/libcloogle\
-I Cloogle/CleanPrettyPrint\
......
......@@ -642,14 +642,18 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag
makeInstanceTable(extra['class_instances'], 'type'),
pluralise(extra['class_instances'].length, 'instance')]);
var html = highlightClean(
'class ' + extra['class_heading'] +
(extra['class_funs'].length > 0 ? ' where' : ''),
highlightCallback) + '\n';
for (var i in extra['class_funs'])
html += highlightClean(
'\n ' + extra['class_funs'][i].replace(/\n/g, '\n '),
highlightCallback, 'macro');
var code = 'class ' + extra['class_heading'] +
(extra['class_funs'].length > 0 ? '\nwhere\n' : '');
for (var i in extra['class_funs']) {
if ('class_fun_doc' in extra &&
extra['class_fun_doc'].length > i &&
extra['class_fun_doc'][i].length == 2)
code += '\t' + extra['class_fun_doc'][i][1].replace(/\n/g, '\n\t') + '\n';
code += '\t' + extra['class_funs'][i].replace(/\n/g, '\n\t');
if (i < extra['class_funs'].length - 1)
code += '\n\n';
}
var html = highlightClean(code, highlightCallback);
return makeGenericResultHTML(basic, meta, hidden, html);
......
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