public class InlineStyle extends AbstractNodeHandler
Constructor and Description |
---|
InlineStyle() |
Modifier and Type | Method and Description |
---|---|
void |
handleNode(NodeHandler parent,
Element node,
DocumentConverter converter)
Renders inline styling (bold, italics) for the given tag.
|
void |
handleTextNode(TextNode node,
DocumentConverter converter)
Handle a child text node.
|
handleIgnoredHTMLElement, prependAndRecurse
public void handleNode(NodeHandler parent, Element node, DocumentConverter converter)
em
, strong
) as
well as explicit styling via the style
attribute.
This object keeps track of the depth of the styling, to prevent recursive situations like this:
<em>hello <em>world</em></em>
A naive method would be render the example incorrectly (the output would be *hello **world*
)
parent
- The previous node walker, in case we just want to remove an element.node
- Node to handleconverter
- Parent converter for this object.public void handleTextNode(TextNode node, DocumentConverter converter)
AbstractNodeHandler
handleTextNode
in interface NodeHandler
handleTextNode
in class AbstractNodeHandler
node
- Node to handleconverter
- Parent converter for this object.Copyright © 2017. All rights reserved.