Index: jrst2/src/java/org/codelutin/jrst/ReStructuredText.java diff -u jrst2/src/java/org/codelutin/jrst/ReStructuredText.java:1.9 jrst2/src/java/org/codelutin/jrst/ReStructuredText.java:1.10 --- jrst2/src/java/org/codelutin/jrst/ReStructuredText.java:1.9 Thu May 10 16:13:49 2007 +++ jrst2/src/java/org/codelutin/jrst/ReStructuredText.java Tue May 22 13:09:33 2007 @@ -23,9 +23,9 @@ * Created: 27 oct. 06 11:10:30 * * @author poussin - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ * - * Last update: $Date: 2007/05/10 16:13:49 $ + * Last update: $Date: 2007/05/22 13:09:33 $ * by : $Author: sletellier $ */ @@ -182,7 +182,7 @@ public static final Pattern REGEX_EMPHASIS = Pattern.compile("\\*([^*(\\]_.+\\[)].+?)\\*"); public static final Pattern REGEX_STRONG = Pattern.compile("\\*\\*(.+?)\\*\\*"); public static final Pattern REGEX_LITERAL = Pattern.compile("``(.+?)``"); - public static final Pattern REGEX_REFERENCE = Pattern.compile("(http://[-/%#&\\._\\w]+)([^-/%#&\\._\\w]|$)"); + public static final Pattern REGEX_REFERENCE = Pattern.compile("(http://[-/%#&\\._\\w]+)([^-/%#&_\\w]+)"); public static final Pattern REGEX_INLINE_REFERENCE = Pattern.compile("`(.+) ?<(http://[-/%#&\\._\\w]+)>`_"); public static final Pattern REGEX_EMAIL = Pattern.compile("(^|[^_\\w])([-\\._\\w]+@[-\\._\\w]+)([^-\\._\\w]|$)"); public static final Pattern REGEX_FOOTNOTE_REFERENCE = Pattern.compile("\\[(#|[0-9]|\\*)\\w*\\]_"); Index: jrst2/src/java/org/codelutin/jrst/JRSTReader.java diff -u jrst2/src/java/org/codelutin/jrst/JRSTReader.java:1.25 jrst2/src/java/org/codelutin/jrst/JRSTReader.java:1.26 --- jrst2/src/java/org/codelutin/jrst/JRSTReader.java:1.25 Tue May 22 09:24:01 2007 +++ jrst2/src/java/org/codelutin/jrst/JRSTReader.java Tue May 22 13:09:33 2007 @@ -23,9 +23,9 @@ * Created: 27 oct. 06 00:15:34 * * @author poussin - * @version $Revision: 1.25 $ + * @version $Revision: 1.26 $ * - * Last update: $Date: 2007/05/22 09:24:01 $ + * Last update: $Date: 2007/05/22 13:09:33 $ * by : $Author: sletellier $ */ @@ -364,7 +364,8 @@ * @throws IOException * @throws DocumentException */ - public Document read(Reader reader) throws Exception { + public Document read(Reader reader, int idMax) throws Exception { + this.idMax=idMax; JRSTLexer lexer = new JRSTLexer(reader); try { Element root = composeDocument(lexer); @@ -418,8 +419,10 @@ } int levelInit = Integer.parseInt(eTitle.getFirst().attributeValue("level")); LinkedList title = new LinkedList(); - for (int i=0;i