Don't pretty-print twice. #1079

This commit is contained in:
Mayhem 2013-05-04 19:56:46 +02:00
parent cbfe97f933
commit 475f166617

View File

@ -33,7 +33,12 @@ Fourchan =
code: ->
return if @isClone
for pre in $$ '.prettyprint', @nodes.comment
$.event 'prettyprint', pre, window
# Don't pretty print twice:
# Might need a better way to detect if a .prettyprint
# is already pretty-printed. We can't just look for spans
# since 4chan inserts its quotes and whatnot inside.
unless $ '.pln', pre
$.event 'prettyprint', pre, window
return
math: ->
return if @isClone or !$ '.math', @nodes.comment