Index: widgeditor.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/widgeditor/widgeditor.module,v
retrieving revision 1.1.2.3
diff -u -F^function -r1.1.2.3 widgeditor.module
--- widgeditor.module	30 Mar 2007 09:45:17 -0000	1.1.2.3
+++ widgeditor.module	22 May 2007 17:28:03 -0000
@@ -54,7 +54,6 @@ function widgeditor_form_alter($form_id,
 }
 
 function widgeditor_add_javascript($textareas = array(), $def_enabled) {
-
   $query = '';
   foreach ($textareas as $i => $ta) {
     $pattern = '/(\d+)-(\w+)/i';
@@ -65,33 +64,38 @@ function widgeditor_add_javascript($text
   drupal_add_js(drupal_get_path('module', 'widgeditor') . '/' . 'scripts/widgEditor.js');
   drupal_add_css(drupal_get_path('module', 'widgeditor') . '/' . 'scripts/css/widgEditor.css');
   if ($def_enabled) {
-  drupal_add_js('if (Drupal.jsEnabled) {
-  $(document).ready(function() {
-    var textareas = new Array();
-' . $query . '
-    for (i=0;i<textareas.length;i++) {
-      $("textarea#"+textareas[i]).attr("class","widgEditor");
-    }
-  });
-}', 'inline');}
+    drupal_add_js('
+      if (Drupal.jsEnabled) {
+        $(document).ready(function() {
+          var textareas = new Array();
+          ' . $query . '
+          for (i=0;i<textareas.length;i++) {
+            $("textarea#"+textareas[i]).attr("class","widgEditor");
+          }
+        });
+      }',
+      'inline');
+  }
   else {
-    drupal_add_js('if (Drupal.jsEnabled) {
-  $(document).ready(function() {
-    var textareas = new Array();
-' . $query . '
-    for (i=0;i<textareas.length;i++) {
-      $("textarea#"+textareas[i]).after(\'<div><a style="cursor: pointer;" id="widgEditor-id" class="widgEditor-\' + textareas[i] +\'">Enable WYSIWYG</a></div>\');
-    }
-    $("a#widgEditor-id").click(function(){
-      var string1= $(this).attr("class");
-      var pattern=/(widgEditor)-(\w+)-(\w+)/i;
-      if (pattern.test(string1) == true) {
-        $("textarea#"+string1.replace(/widgEditor-/, "")).attr("class","widgEditor");
-        widgInit();
-        $(this).hide("slow");
-      }
-    });
-  });
-}', 'inline');
+    drupal_add_js('
+      if (Drupal.jsEnabled) {
+        $(document).ready(function() {
+          var textareas = new Array();
+          ' . $query . '
+          for (i=0;i<textareas.length;i++) {
+            $("textarea#"+textareas[i]).after(\'<div><a style="cursor: pointer;" id="widgEditor-id" class="widgEditor-\' + textareas[i] +\'">Enable WYSIWYG</a></div>\');
+          }
+          $("a#widgEditor-id").click(function(){
+            var string1= $(this).attr("class");
+            var pattern=/(widgEditor)-(\w+)-(\w+)/i;
+            if (pattern.test(string1) == true) {
+              $("textarea#"+string1.replace(/widgEditor-/, "")).attr("class","widgEditor");
+              widgInit();
+              $(this).hide("slow");
+            }
+          });
+        });
+      }',
+      'inline');
   }
-}
+}
\ No newline at end of file
