01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.wikitext.widgets;
04:
05: import fitnesse.wiki.WikiPage;
06:
07: import fitnesse.wikitext.WidgetBuilder;
08:
09: import java.util.regex.Matcher;
10:
11: public class TextIgnoringWidgetRoot extends WidgetRoot {
12: public TextIgnoringWidgetRoot(String value, WikiPage page,
13: WidgetBuilder builder) throws Exception {
14: super (value, page, builder);
15: }
16:
17: public void addChildWidgets(String value) throws Exception {
18: Matcher m = getBuilder().getWidgetPattern().matcher(value);
19: if (m.find()) {
20: getBuilder().makeWidget(this , m);
21: String postString = value
22: .substring(m.end(), value.length());
23: if (!postString.equals(""))
24: addChildWidgets(postString);
25: }
26: }
27: }
|