1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 13:30:00 +00:00

Use spaces instead of tabs

This commit is contained in:
Nazo 2017-05-16 21:32:54 +03:00
parent 6f61970559
commit 2523201757

View file

@ -105,13 +105,13 @@ document.addEventListener("DOMContentLoaded", function() {
var previewTabEl = markdownEditor.querySelector(previewTabSelector); var previewTabEl = markdownEditor.querySelector(previewTabSelector);
var targetEl = markdownEditor.querySelector(targetSelector); var targetEl = markdownEditor.querySelector(targetSelector);
var reader = new commonmark.Parser({safe: true}); var reader = new commonmark.Parser({safe: true});
var writer = new commonmark.HtmlRenderer({safe: true}); var writer = new commonmark.HtmlRenderer({safe: true});
writer.softbreak = '<br />'; writer.softbreak = '<br />';
previewTabEl.addEventListener('click', function () { previewTabEl.addEventListener('click', function () {
var parsed = reader.parse(sourceSelector.value.trim()); var parsed = reader.parse(sourceSelector.value.trim());
targetEl.innerHTML = writer.render(parsed); targetEl.innerHTML = writer.render(parsed);
}); });
}); });
}); });