mirror of
https://gitlab.com/SIGBUS/nyaa.git
synced 2024-12-22 11:40:01 +00:00
Fix markdown linebreaks and match preview render options with final
This commit is contained in:
parent
46682861d0
commit
3bdff6246f
|
@ -92,7 +92,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
var targetEl = markdownEditor.querySelector(targetSelector);
|
||||
|
||||
previewTabEl.addEventListener('click', function () {
|
||||
targetEl.innerHTML = marked(sourceSelector.value.trim());
|
||||
targetEl.innerHTML = marked(sourceSelector.value.trim(), { sanitize: true, breaks:true });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<script>
|
||||
var target = document.getElementById('torrent-description');
|
||||
var text = target.innerHTML;
|
||||
var html = marked(text.trim(), { sanitize: true });
|
||||
var html = marked(text.trim(), { sanitize: true, breaks:true });
|
||||
target.innerHTML = html;
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue