summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
Diffstat (limited to 'parsers')
-rw-r--r--parsers/Paragraphs.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/parsers/Paragraphs.java b/parsers/Paragraphs.java
index 295d14a..864877d 100644
--- a/parsers/Paragraphs.java
+++ b/parsers/Paragraphs.java
@@ -15,14 +15,17 @@ public class Paragraphs implements Parser {
* tags in place.
*/
Pattern pattern = Pattern.compile("((\\={10,})\\n(.+?)\\n(\\2))|((^.+$\\n)+)",Pattern.MULTILINE);
+ Pattern htmlTagPattern = Pattern.compile("^\\<.+?\\>\\n");
Matcher matcher = pattern.matcher(fileContent);
+ Matcher htmlTag;
StringBuffer sbuffer = new StringBuffer();
while(matcher.find()) {
- // group 1 contains the regex for the Heading, so
- // if that is null, then it means that we have actually
- // found a paragraph.
- if(matcher.group(1)==null)
+ htmlTag = htmlTagPattern.matcher(matcher.group());
+ if(htmlTag.find()) {
+ System.out.println(htmlTag.group());
+ }else {
matcher.appendReplacement(sbuffer,paragraph);
+ }
}
matcher.appendTail(sbuffer);
return sbuffer.toString();