Search in sources :

Example 1 with TextNode

use of org.pegdown.ast.TextNode in project zeppelin by apache.

the class PegdownWebSequencelPlugin method BlockRule.

Rule BlockRule() {
    StringBuilderVar style = new StringBuilderVar();
    StringBuilderVar body = new StringBuilderVar();
    return NodeSequence(StartMarker(), Optional(String("style="), Sequence(OneOrMore(Letter()), style.append(match()), Spn1())), Sequence(Body(), body.append(match())), EndMarker(), push(new ExpImageNode("title", createWebsequenceUrl(style.getString(), body.getString()), new TextNode(""))));
}
Also used : StringBuilderVar(org.parboiled.support.StringBuilderVar) TextNode(org.pegdown.ast.TextNode) ExpImageNode(org.pegdown.ast.ExpImageNode)

Example 2 with TextNode

use of org.pegdown.ast.TextNode in project zeppelin by apache.

the class PegdownYumlPlugin method BlockRule.

Rule BlockRule() {
    ParamVar<String, String> params = new ParamVar<String, String>();
    StringBuilderVar name = new StringBuilderVar();
    StringBuilderVar value = new StringBuilderVar();
    StringBuilderVar body = new StringBuilderVar();
    return NodeSequence(StartMarker(), ZeroOrMore(Sequence(ParameterName(), name.append(match()), String("="), OneOrMore(Alphanumeric()), value.append(match())), Sp(), params.put(name.getString(), value.getString()), name.clear(), value.clear()), Body(), body.append(match()), EndMarker(), push(new ExpImageNode("title", createYumlUrl(params.get(), body.getString()), new TextNode(""))));
}
Also used : StringBuilderVar(org.parboiled.support.StringBuilderVar) TextNode(org.pegdown.ast.TextNode) StringUtils.defaultString(org.apache.commons.lang3.StringUtils.defaultString) ExpImageNode(org.pegdown.ast.ExpImageNode)

Aggregations

StringBuilderVar (org.parboiled.support.StringBuilderVar)2 ExpImageNode (org.pegdown.ast.ExpImageNode)2 TextNode (org.pegdown.ast.TextNode)2 StringUtils.defaultString (org.apache.commons.lang3.StringUtils.defaultString)1