Class InlineStyle

  extended by com.overzealous.remark.convert.AbstractNodeHandler
      extended by com.overzealous.remark.convert.InlineStyle
All Implemented Interfaces:

public class InlineStyle
extends AbstractNodeHandler

Handles various inline styling (italics and bold), such as em, i, strong, b, span, and font tags.

Phil DeJarnett

Constructor Summary
Method Summary
 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.
Methods inherited from class com.overzealous.remark.convert.AbstractNodeHandler
handleIgnoredHTMLElement, prependAndRecurse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public InlineStyle()
Method Detail


public void handleNode(NodeHandler parent,
                       Element node,
                       DocumentConverter converter)
Renders inline styling (bold, italics) for the given tag. It handles implicit styling (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 handle
converter - Parent converter for this object.


public void handleTextNode(TextNode node,
                           DocumentConverter converter)
Description copied from class: AbstractNodeHandler
Handle a child text node. The default method, implemented here, is to simply write the cleaned text directly.

Specified by:
handleTextNode in interface NodeHandler
handleTextNode in class AbstractNodeHandler
node - Node to handle
converter - Parent converter for this object.

© 2011 OverZealous Creations, LLC - BitBucket Repository