]> source.dussan.org Git - gwtquery.git/commitdiff
Better and faster regex
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Mon, 18 Nov 2013 10:04:59 +0000 (11:04 +0100)
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Mon, 18 Nov 2013 10:04:59 +0000 (11:04 +0100)
gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java

index 8328d811d9200a7fe7ac22380cd42330c3c2bcbc..7e5ea15c33c591a433dc8388855ea71a777950db 100644 (file)
@@ -92,7 +92,7 @@ public class JsniBundleGenerator extends Generator {
                 // remove MS <CR>
                 .replace("\r", "")
                 // remove 'c' (/* */) style comments blocks 
-                .replaceAll("(\\s*/\\*[\\s\\S]*?\\*/\\s*)", "\n")
+                .replaceAll("/\\*(?>(?:(?>[^\\*]+)|\\*(?!/))*)\\*/", "")
                 // remove 'c++' (//) style comment lines
                 .replaceAll("(?m)^\\s*//.*$", "")
                 // remove 'c++' (//) style comments at the end of a code line