Index: jrst2/src/java/org/codelutin/jrst/JRSTReader.java diff -u jrst2/src/java/org/codelutin/jrst/JRSTReader.java:1.24 jrst2/src/java/org/codelutin/jrst/JRSTReader.java:1.25 --- jrst2/src/java/org/codelutin/jrst/JRSTReader.java:1.24 Tue May 15 10:46:49 2007 +++ jrst2/src/java/org/codelutin/jrst/JRSTReader.java Tue May 22 09:24:01 2007 @@ -23,9 +23,9 @@ * Created: 27 oct. 06 00:15:34 * * @author poussin - * @version $Revision: 1.24 $ + * @version $Revision: 1.25 $ * - * Last update: $Date: 2007/05/15 10:46:49 $ + * Last update: $Date: 2007/05/22 09:24:01 $ * by : $Author: sletellier $ */ @@ -376,12 +376,10 @@ e.addAttribute("level", null); String type = e.attributeValue("type"); - boolean done = false; if (type!=null){ if (type.equals("contents")){ composeContents(e); e.addAttribute("type",null); - done=true; } } if ("true".equalsIgnoreCase(e.attributeValue("inline"))) { @@ -402,6 +400,9 @@ throw eee; } } + /** + * @param Element e + */ private void composeContents(Element e) { Element result = DocumentHelper.createElement(TOPIC); @@ -446,7 +447,10 @@ e.setText(""); e.appendContent(result); } - + /** + * @param LinkedList title, String num + * @return Element + */ private Element composeLineContent(LinkedList title, String num) { Element result = DocumentHelper.createElement(BULLET_LIST); if (sectnum) @@ -611,7 +615,6 @@ } // skip blank line //skipBlankLine(lexer); - item = lexer.peekDocInfo(); } @@ -776,12 +779,17 @@ } return parent; } + /** + * @param item + * @return Element + * @throws Exception + */ private Element composeInclude(Element item) throws Exception { String option = item.attributeValue("option"); String path = item.getText(); Element result = null; if (option.equals("literal")){ - result=DocumentHelper.createElement("LITERAL_BLOCK"); + result=DocumentHelper.createElement(LITERAL_BLOCK); FileReader reader = new FileReader(path); BufferedReader bf = new BufferedReader(reader); String line=""; @@ -803,14 +811,19 @@ } return result; } - - + /** + * @param item + * @return Element + */ private Element composeComment(Element item) { return item; } - + /** + * @param item + * @return Element + */ private Element composeTargetAnonymous(Element item) { Element result = DocumentHelper.createElement(TARGET); result.addAttribute("anonymous", "1"); @@ -835,7 +848,6 @@ * @return Element * @throws Exception */ - // TODO bug caractere speciaux : auto-symbols @SuppressWarnings("unchecked") private Element[] composeFootnote(Element item) throws Exception { Element[] result=null; @@ -1742,6 +1754,7 @@ begin = text.length(); text += end; matcher = REGEX_SUBSTITUTION_REFERENCE.matcher(text); + } Index: jrst2/src/java/org/codelutin/jrst/JRSTLexer.java diff -u jrst2/src/java/org/codelutin/jrst/JRSTLexer.java:1.21 jrst2/src/java/org/codelutin/jrst/JRSTLexer.java:1.22 --- jrst2/src/java/org/codelutin/jrst/JRSTLexer.java:1.21 Mon May 14 14:41:07 2007 +++ jrst2/src/java/org/codelutin/jrst/JRSTLexer.java Tue May 22 09:24:01 2007 @@ -23,9 +23,9 @@ * Created: 28 oct. 06 00:44:20 * * @author poussin - * @version $Revision: 1.21 $ + * @version $Revision: 1.22 $ * - * Last update: $Date: 2007/05/14 14:41:07 $ + * Last update: $Date: 2007/05/22 09:24:01 $ * by : $Author: sletellier $ */ @@ -435,16 +435,17 @@ return result; } /** - * read options + * read include *
-     * -a            command-line option "a"
-	 * -1 file, --one=file, --two file
-     *        Multiple options with arguments.
+     * .. include:: text.txt
+     * or
+     * .. include:: literal
+     *      text.txt
+     * 
      * 
* * @return Element * @throws IOException - * @throws IOException */ private Element peekInclude() throws IOException{ beginPeek(); @@ -469,6 +470,17 @@ endPeek(); return result; } + /** + * read options + *
+     * -a            command-line option "a"
+     * -1 file, --one=file, --two file
+     *        Multiple options with arguments.
+     * 
+ * + * @return Element + * @throws IOException + */ public Element peekOption() throws IOException { /* -a command-line option "a" @@ -1746,6 +1758,11 @@ endPeek(); return result; } + /** + * .. __: http://www.python.org + * @return Element + * @throws IOException + */ private Element peekTargetAnonymous() throws IOException{ beginPeek(); Element result = null; @@ -1764,6 +1781,12 @@ endPeek(); return result; } + /** + * .. + * comment + * @return Element + * @throws IOException + */ private Element peekComment() throws IOException{ beginPeek(); Element result = null;