Update of
/var/cvs/speeltuin/ernst/tagfileparser/src/nl/vpro/tagfileparser/parser
In directory james.mmbase.org:/tmp/cvs-serv7886/src/nl/vpro/tagfileparser/parser
Modified Files:
RegexpParser.java
Log Message:
See also:
http://cvs.mmbase.org/viewcvs/speeltuin/ernst/tagfileparser/src/nl/vpro/tagfileparser/parser
Index: RegexpParser.java
===================================================================
RCS file:
/var/cvs/speeltuin/ernst/tagfileparser/src/nl/vpro/tagfileparser/parser/RegexpParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- RegexpParser.java 15 Jul 2008 06:54:23 -0000 1.3
+++ RegexpParser.java 30 Sep 2008 11:37:13 -0000 1.4
@@ -9,7 +9,7 @@
/**
* Matches the lines of the iterator with a regular expression, and calls
* template methods according to the result. This class is not thread safe!
- *
+ * TODO: test
* @author Ernst Bunders
*
*/
@@ -31,7 +31,6 @@
protected TagInfo tag;
public RegexpParser(String startPattern, String endPattern, boolean
findOne) {
- super();
this.startPattern = startPattern;
this.endPattern = endPattern;
this.findOne = findOne;
@@ -50,7 +49,6 @@
boolean reading = false;
while (lines.hasNext()) {
this.tag = tag;
- // TODO: do using startsWith() and endsWith() regular
expressions?
String line = lines.next();
log.info("considering line: ["+line+"]");
if( reading == false){
@@ -72,8 +70,8 @@
}
}
}else{
- //add this line to the construction
- construction = construction + line;
+ //add this line to the construction, preserving
the newline
+ construction = construction + "\n" + line;
if (StringUtil.endsWith(line, endPattern)) {
//construction complete
use(construction, tag);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs