Package edu.odu.cs.cowem.documents
Class CWMcleaner
- java.lang.Object
-
- edu.odu.cs.cowem.documents.CWMcleaner
-
- All Implemented Interfaces:
TextSubstitutions
public class CWMcleaner extends java.lang.Object implements TextSubstitutions
The pegDown processor gets confused by passthrough HTML display elements (though inline elements are OK)., often adding bogus <p> elements around the opening and/or closing tag, resulting in bad XML. As a workaround, the macro processor can be used to insert <cwm tag='tagname' ... /> empty elements. Here we change these to <tagname ... >, after stripping away any immediately adjacent <p> and </p> tags.
-
-
Constructor Summary
Constructors Constructor Description CWMcleaner()Create a cleaner.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringapply(java.lang.String target)Apply substitutions.
-
-
-
Method Detail
-
apply
public final java.lang.String apply(java.lang.String target)
Apply substitutions.- Specified by:
applyin interfaceTextSubstitutions- Parameters:
target- original string- Returns:
- original after applying substitutions.
-
-