note revisions for code is now properly formatted, fixes #97

This commit is contained in:
azivner 2018-04-08 12:13:52 -04:00
parent 9720868f5a
commit 6bb3cfa9a3

View file

@ -54,7 +54,13 @@ $list.on('change', () => {
const revisionItem = revisionItems.find(r => r.noteRevisionId === optVal);
$title.html(revisionItem.title);
$content.html(revisionItem.content);
if (revisionItem.type === 'text') {
$content.html(revisionItem.content);
}
else if (revisionItem.type === 'code') {
$content.html($("<pre>").text(revisionItem.content));
}
});
$(document).on('click', "a[action='note-revision']", event => {