Author: sdumitriu Date: 2008-02-15 02:59:53 +0100 (Fri, 15 Feb 2008) New Revision: 7743
Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java Log: [misc] Use the same pattern in TOCGenerator as in the Radeox filter Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java =================================================================== --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java 2008-02-15 01:45:33 UTC (rev 7742) +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/util/TOCGenerator.java 2008-02-15 01:59:53 UTC (rev 7743) @@ -49,7 +49,7 @@ int previousNumbers[] = {0, 0, 0, 0, 0, 0, 0}; Pattern pattern = - Pattern.compile("^[\\p{Space}]*(1(\\.1)*)[\\p{Space}]+(.*?)$", Pattern.MULTILINE); + Pattern.compile("(?-s)^[ \\t]*+(1(\\.1){0,5}+)[ \\t]++(.++)$", Pattern.MULTILINE); Matcher matcher = pattern.matcher(content); while (matcher.find()) { int level = (matcher.group(1).lastIndexOf("1") + 2) / 2; _______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications