Index: boilerpipe-core/src/main/de/l3s/boilerpipe/sax/CommonTagActions.java |
diff --git a/boilerpipe-core/src/main/de/l3s/boilerpipe/sax/CommonTagActions.java b/boilerpipe-core/src/main/de/l3s/boilerpipe/sax/CommonTagActions.java |
index 123031e6293ccf61bd31e9cc56d9b6c11c04fd11..8aa98e9e31390b26b656b3659464b7de8d2662da 100644 |
--- a/boilerpipe-core/src/main/de/l3s/boilerpipe/sax/CommonTagActions.java |
+++ b/boilerpipe-core/src/main/de/l3s/boilerpipe/sax/CommonTagActions.java |
@@ -209,7 +209,7 @@ public abstract class CommonTagActions { |
}; |
private static final Pattern PAT_FONT_SIZE = Pattern |
.compile("([\\+\\-]?)([0-9])"); |
- |
+ |
/** |
* Explicitly marks this tag a simple "block-level" element, which always generates whitespace |
*/ |
@@ -225,12 +225,33 @@ public abstract class CommonTagActions { |
final String localName, final String qName) { |
return true; |
} |
- |
+ |
public boolean changesTagLevel() { |
return true; |
} |
- }; |
- |
+ }; |
+ |
+ /** |
+ * Explicitly marks this tag an inline-block element, which does not generate whitespace. |
+ */ |
+ public static final TagAction TA_INLINE_BLOCK_LEVEL = new TagAction() { |
+ |
+ public boolean start(BoilerpipeHTMLContentHandler instance, |
+ final String localName, final String qName, |
+ final Attributes atts) { |
+ return false; |
+ } |
+ |
+ public boolean end(BoilerpipeHTMLContentHandler instance, |
+ final String localName, final String qName) { |
+ return false; |
+ } |
+ |
+ public boolean changesTagLevel() { |
+ return true; |
+ } |
+ }; |
+ |
/** |
* Special TagAction for the <code><FONT></code> tag, which keeps track of the |
* absolute and relative font size. |