Fix handling <br>s when quoting selection in QR

The previous code caused, among others, merging of two-line selections
into one line.
This commit is contained in:
Matěj Grabovský 2014-04-26 21:01:13 +02:00 committed by ccd0
parent f337dcb0ca
commit bb1fcadfa2

View File

@ -229,7 +229,7 @@ QR =
$.prepend frag, $.tn '[code]'
$.add frag, $.tn '[/code]'
for node in $$ 'br', frag
$.replace node, $.tn '\n>' unless node is frag.lastElementChild
$.replace node, $.tn '\n>' unless node is frag.lastChild
for node in $$ 's', frag
$.replace node, [$.tn('[spoiler]'), node.childNodes..., $.tn '[/spoiler]']
for node in $$ '.prettyprint', frag