Package org.xwiki.rendering.util
Class ParserUtils
java.lang.Object
org.xwiki.rendering.util.ParserUtils
Methods for helping in parsing.
- Since:
- 1.7M1
- Version:
- $Id: 563184d36a55817b16fc671c0eb1428d04979a82 $
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconvertToInline(List<Block> blocks) Make its best to convert a passed blocks to their inline version.convertToInline(Block rootBlock, boolean preserveXDOM) Make its best to convert a passed block to its inline version.voidremoveTopLevelParagraph(List<Block> blocks) Removes any top level paragraph since for example for the following use case we don't want an extra paragraph block:= hello {{velocity}}world{{/velocity}}.
-
Constructor Details
-
ParserUtils
public ParserUtils()
-
-
Method Details
-
removeTopLevelParagraph
Removes any top level paragraph since for example for the following use case we don't want an extra paragraph block:= hello {{velocity}}world{{/velocity}}.- Parameters:
blocks- the blocks to check and convert
-
convertToInline
Make its best to convert a passed block to its inline version. Sometime it's simply impossible to convert an inline block, in which case it will just be returned as is.- Parameters:
rootBlock- the block to convertpreserveXDOM- true of the XDOM should be returned- Returns:
- the inline version of the passed block
- Since:
- 14.0RC1
-
convertToInline
Make its best to convert a passed blocks to their inline version. Sometime it's simply impossible to convert an inline block, in which case it will just be returned as is.- Parameters:
blocks- the blocks to convert- Since:
- 14.0RC1
-