Search in sources :

Example 1 with GfmIssue

use of com.vladsch.flexmark.ext.gfm.issues.GfmIssue in project flexmark-java by vsch.

the class GfmIssuesInlineParserExtension method parse.

@Override
public boolean parse(final InlineParser inlineParser) {
    BasedSequence[] matches = inlineParser.matchWithGroups(GITHUB_ISSUE);
    if (matches != null) {
        BasedSequence input = inlineParser.getInput();
        inlineParser.flushTextNode();
        BasedSequence openMarker = matches[1];
        BasedSequence text = matches[2];
        GfmIssue gfmIssue = new GfmIssue(openMarker, text);
        inlineParser.getBlock().appendChild(gfmIssue);
        return true;
    }
    return false;
}
Also used : GfmIssue(com.vladsch.flexmark.ext.gfm.issues.GfmIssue) BasedSequence(com.vladsch.flexmark.util.sequence.BasedSequence)

Aggregations

GfmIssue (com.vladsch.flexmark.ext.gfm.issues.GfmIssue)1 BasedSequence (com.vladsch.flexmark.util.sequence.BasedSequence)1