Merge branch 'fix/issue-77'
This commit is contained in:
commit
1253d40422
@ -194,7 +194,7 @@ define(["app/text/html", "app/dom", "app/utils", "app/config", "app/api", "app/m
|
||||
api.view(comment.id, 1).then(function(rv) {
|
||||
var textarea = lib.editorify($.new("div.textarea"));
|
||||
|
||||
textarea.textContent = rv.text;
|
||||
textarea.innerHTML = utils.detext(rv.text);
|
||||
textarea.focus();
|
||||
|
||||
text.classList.remove("text");
|
||||
|
@ -48,9 +48,15 @@ define(["app/markup"], function(Mark) {
|
||||
return _.textContent.trim();
|
||||
};
|
||||
|
||||
var detext = function(text) {
|
||||
return text.replace(/\n\n/gi, '<br><div><br></div>')
|
||||
.replace(/\n/gi, '<br>');
|
||||
};
|
||||
|
||||
return {
|
||||
cookie: cookie,
|
||||
ago: ago,
|
||||
text: text
|
||||
text: text,
|
||||
detext: detext
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user