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:
parent
6f61970559
commit
2523201757
|
@ -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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue