a bit of code reformatting
John Napiorkowski [Fri, 25 Feb 2011 02:35:28 +0000 (21:35 -0500)]
t/tags_as_zoom_events.t

index f7c047c..f70cb2f 100644 (file)
@@ -71,22 +71,29 @@ use HTML::Zoom;
 
   sub _convert_to_events {
     map {
-      ## TODO: This seems quite fragile
       my $raw = ref $_ ? (ref $_ eq 'SCALAR' ? $$_: "$_") : $_;
-      my @info = ($raw =~m{
-      (
-        (?:[^<]*) < (?:
-            ( / )? ( [^/!<>\s"'=]+ )
-            ( (?:"[^"]*"|'[^']*'|[^"'<>])+? )?
-        |   
-            (!-- .*? -- | ![^\-] .*? )
-        ) (\s*/\s*)? >
-      )
-      ([^<]*)
-      }x);
+      my @info = (
+        $raw =~m{
+          (
+            (?:[^<]*) < (?:
+                ( / )? ( [^/!<>\s"'=]+ )
+                ( (?:"[^"]*"|'[^']*'|[^"'<>])+? )?
+            |   
+                (!-- .*? -- | ![^\-] .*? )
+            ) (\s*/\s*)? >
+          )
+          ([^<]*)
+        }x
+      );
 
-      my ($whole, $is_close, $tag_name, $attrs, $comment_or_directive, 
-      $in_place_close)  = @info;
+      my (
+        $whole, 
+        $is_close,
+        $tag_name,
+        $attrs, 
+        $comment_or_directive, 
+        $in_place_close
+      ) = @info;
 
       if($comment_or_directive) {
         +{ type => 'SPECIAL', raw => $raw };