0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Only maintain LI numbering when splitting OL if in BLOCKQUOTE.

Fixes #53
This commit is contained in:
Neil Jenkins 2015-03-29 18:38:40 +11:00
parent 3c8eaa1fcc
commit 4c63ad696e
3 changed files with 6 additions and 6 deletions

View file

@ -421,8 +421,8 @@ function split ( node, offset, stopNode ) {
offset = next;
}
// Maintain li numbering
if ( node.nodeName === 'OL' ) {
// Maintain li numbering if inside a quote.
if ( node.nodeName === 'OL' && getNearest( node, 'BLOCKQUOTE' ) ) {
clone.start = ( +node.start || 1 ) + node.childNodes.length - 1;
}

File diff suppressed because one or more lines are too long

View file

@ -290,8 +290,8 @@ function split ( node, offset, stopNode ) {
offset = next;
}
// Maintain li numbering
if ( node.nodeName === 'OL' ) {
// Maintain li numbering if inside a quote.
if ( node.nodeName === 'OL' && getNearest( node, 'BLOCKQUOTE' ) ) {
clone.start = ( +node.start || 1 ) + node.childNodes.length - 1;
}