From 475f166617e1d72ec1df66129f6d0e0ad532fe6b Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sat, 4 May 2013 19:56:46 +0200 Subject: [PATCH] Don't pretty-print twice. #1079 --- src/Miscellaneous/Fourchan.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Miscellaneous/Fourchan.coffee b/src/Miscellaneous/Fourchan.coffee index ada48b26e..edb2fd36b 100644 --- a/src/Miscellaneous/Fourchan.coffee +++ b/src/Miscellaneous/Fourchan.coffee @@ -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