From 2d3340c6c7f7ae12f11cbe61d7459b84e42219db Mon Sep 17 00:00:00 2001 From: Friederike Schwager <schwager@cil.rwth-aachen.de> Date: Tue, 20 Aug 2019 15:25:45 +0200 Subject: [PATCH] display linebreaks in comments --- shared/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shared/index.js b/shared/index.js index ab1f915..0bf3baa 100644 --- a/shared/index.js +++ b/shared/index.js @@ -1524,6 +1524,9 @@ function startIndex(Y,_cm,_documentObject,_userid,_capabilities, _toolbarSetting if(!comments.comments){ comments = {comments: [comments]}; } + comments.comments.forEach(function(comment) { + comment.content = comment.content.replace(/\n/g, "<br>"); + }); (function(templates, data) { templates.render('mod_pdfannotator/comment', data) .then(function(html,js){ -- GitLab