Package org.xhtmlrenderer.layout
Class WhitespaceStripper
java.lang.Object
org.xhtmlrenderer.layout.WhitespaceStripper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
canCollapseThrough
(Styleable styleable) private static String
collapseWhitespace
(InlineBox iB, IdentValue whitespace, String text, boolean collapseLeading) static void
stripInlineContent
(List<Styleable> inlineContent) Strips whitespace early in inline content generation.private static void
stripTextContent
(List<Styleable> stripped) private static boolean
stripWhitespace
(InlineBox iB, boolean collapseLeading) this function strips all whitespace from the text according to the CSS 2.1 spec on whitespace handling.
-
Field Details
-
SPACE
- See Also:
-
EOL
- See Also:
-
EOLC
public static final char EOLC- See Also:
-
linefeed_space_collapse
-
linefeed_to_space
-
tab_to_space
-
space_collapse
-
space_before_linefeed_collapse
-
-
Constructor Details
-
WhitespaceStripper
public WhitespaceStripper()
-
-
Method Details
-
stripInlineContent
Strips whitespace early in inline content generation. This can be done because "whitespage" does not ally to :first-line and :first-letter. For dynamic pseudo-classes we are allowed to choose which properties apply. NOTE: TheinlineContent
parameter may be modified -
canCollapseThrough
-
stripTextContent
-
stripWhitespace
this function strips all whitespace from the text according to the CSS 2.1 spec on whitespace handling. It accounts for the different whitespace settings like normal, nowrap, pre, etc- Returns:
- whether the next leading space should collapse or not.
-
collapseWhitespace
private static String collapseWhitespace(InlineBox iB, IdentValue whitespace, String text, boolean collapseLeading)
-