From 085c90ca523c10d009d68dd4e0aedb796d232ca4 Mon Sep 17 00:00:00 2001
From: Kieron Taylor <ktaylor@ebi.ac.uk>
Date: Fri, 26 Oct 2012 13:14:36 +0000
Subject: [PATCH] code_action() was prematurely switching mode on /sub/ but
 substr also matched. Added following character pattern to allow sub{, sub ,
 but not substr.

---
 misc-scripts/doxygen_filter/EnsEMBL/PerlFilter.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc-scripts/doxygen_filter/EnsEMBL/PerlFilter.pm b/misc-scripts/doxygen_filter/EnsEMBL/PerlFilter.pm
index fdcea3038a..9916536df9 100644
--- a/misc-scripts/doxygen_filter/EnsEMBL/PerlFilter.pm
+++ b/misc-scripts/doxygen_filter/EnsEMBL/PerlFilter.pm
@@ -445,7 +445,7 @@ sub code_action {
     
     push @big_buffer,$line; 
     # When we run out of open brackets, or we hit weird unpaired brackets in strings or comments
-    if ($brackets <=0 || $line =~ /^=/ || $line =~ /^\s*sub/ || $line =~ /^\s*1;/) {
+    if ($brackets <=0 || $line =~ /^=/ || $line =~ /^\s*sub[\s{]/ || $line =~ /^\s*1;/) {
         $state = NORMAL;
         push @big_buffer,"\@endcode\n </div>*/\n";
     	#Add fake function for doxygen to find after the comment.
-- 
GitLab