Remove inlined posts before parsing clone. #1133

This commit is contained in:
ccd0 2016-10-29 16:42:40 -07:00
parent a675855470
commit 2503ffaad8

View File

@ -16,14 +16,14 @@ Post.Clone = class extends Post
node.id = Post.Clone.prefix + node.id
Post.Clone.prefix++
@nodes = @parseNodes root
# Remove inlined posts inside of this post.
for inline in $$ '.inline', @nodes.post
for inline in $$ '.inline', root
$.rm inline
for inlined in $$ '.inlined', @nodes.post
for inlined in $$ '.inlined', root
$.rmClass inlined, 'inlined'
@nodes = @parseNodes root
root.hidden = false # post hiding
$.rmClass root, 'forwarded' # quote inlining
$.rmClass @nodes.post, 'highlight' # keybind navigation, ID highlighting