From bada48ae765d09ef2dafc117b647497616d2d415 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Thu, 12 Jun 2014 16:55:29 +0100 Subject: [PATCH] Do pesticide plugin on save if not MD --- lib/file-control.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/file-control.php b/lib/file-control.php index b372a57..984f6af 100644 --- a/lib/file-control.php +++ b/lib/file-control.php @@ -323,7 +323,11 @@ if ($_GET['action']=="save") { } } // Reload previewWindow window if not a Markdown file - echo 'if (top.ICEcoder.previewWindow.location && top.ICEcoder.previewWindow.location.pathname.indexOf(".md")==-1) {top.ICEcoder.previewWindow.location.reload()};'; + echo 'if (top.ICEcoder.previewWindow.location && top.ICEcoder.previewWindow.location.pathname.indexOf(".md")==-1) { + top.ICEcoder.previewWindow.location.reload(); + // Do the pesticide plugin if it exists + try {top.ICEcoder.doPesticide();} catch(err) {}; + };'; echo 'top.ICEcoder.setPreviousFiles();action="doneSave";'; } else { $loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);