From 200272fa22da603629fc8b7d1a68f70f06e02745 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 23 Aug 2018 12:59:21 +0200 Subject: [PATCH] Minor frontend fixes --- frontend/api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/api.js b/frontend/api.js index 86dbe3c..e28a6fb 100644 --- a/frontend/api.js +++ b/frontend/api.js @@ -619,7 +619,7 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag var comments = ['']; for (var i in extra['type_field_doc']) comments.push(extra['type_field_doc'][i].length > 1 - ? '//* ' + extra['type_field_doc'][i][1] + ? '//* ' + extra['type_field_doc'][i][1].replace('\n', ' ') : ''); code = mergeComments(code, comments) } @@ -627,7 +627,7 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag var comments = ['']; for (var i in extra['type_constructor_doc']) comments.push(extra['type_constructor_doc'][i].length > 1 - ? '//* ' + extra['type_constructor_doc'][i][1] + ? '//* ' + extra['type_constructor_doc'][i][1].replace('\n', ' ') : ''); code = mergeComments(code, comments) } @@ -714,7 +714,7 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag case 'ProblemResult': result = result[1]; - var solutions = '', examples = []; + var solutions = '', examples = ''; for (var i in result.problem_solutions) solutions += '
  • ' + result.problem_solutions[i].markup() + '
  • '; for (var i in result.problem_examples) @@ -727,7 +727,7 @@ function getResults(str, libs, include_builtins, include_core, include_apps, pag '
    ' + result.problem_description.markup() + '
    Possible solutions:' + - 'Examples:' + + (examples != '' ? ('Examples:') : '') + 'Edit this explanation on GitHub.' + 'This text is licensed under CC-BY-SA-4.0.' + '
    ' + -- GitLab