Search in sources :

Example 1 with Inline

use of org.eclipse.mylyn.wikitext.commonmark.internal.inlines.Inline in project mylyn.docs by eclipse.

the class ParagraphBlock method processInlines.

void processInlines(ProcessingContext context, DocumentBuilder builder, LineSequence lineSequence, boolean asBlock) {
    TextSegment textSegment = extractTextSegment(lineSequence);
    List<Inline> inlines = context.getInlineParser().parse(context, textSegment);
    if (!emptyParagraph(inlines)) {
        builder.setLocator(textSegment.getLines().get(0).toLocator());
        if (asBlock) {
            builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
        }
        InlineParser.emit(builder, inlines);
        if (asBlock) {
            builder.endBlock();
        }
    }
}
Also used : Attributes(org.eclipse.mylyn.wikitext.parser.Attributes) TextSegment(org.eclipse.mylyn.wikitext.commonmark.internal.TextSegment) Inline(org.eclipse.mylyn.wikitext.commonmark.internal.inlines.Inline)

Aggregations

TextSegment (org.eclipse.mylyn.wikitext.commonmark.internal.TextSegment)1 Inline (org.eclipse.mylyn.wikitext.commonmark.internal.inlines.Inline)1 Attributes (org.eclipse.mylyn.wikitext.parser.Attributes)1