use of org.eclipse.mylyn.wikitext.commonmark.internal.ProcessingContext in project mylyn.docs by eclipse.
the class CommonMarkLanguage method processContent.
@Override
public void processContent(MarkupParser parser, String markupContent, boolean asDocument) {
checkNotNull(parser);
checkNotNull(markupContent);
DocumentBuilder builder = checkNotNull(parser.getBuilder());
if (asDocument) {
builder.beginDocument();
}
SourceBlocks sourceBlocks = CommonMark.sourceBlocks();
ProcessingContext context = createContext(sourceBlocks, markupContent);
sourceBlocks.process(context, builder, LineSequence.create(markupContent));
if (asDocument) {
builder.endDocument();
}
}
use of org.eclipse.mylyn.wikitext.commonmark.internal.ProcessingContext in project mylyn.docs by eclipse.
the class InlineTest method createContext.
@Test
public void createContext() {
ProcessingContextBuilder builder = ProcessingContext.builder();
new Inline(new Line(1, 2, "text"), 0, 1) {
@Override
public void emit(DocumentBuilder builder) {
}
}.createContext(builder);
ProcessingContext context = builder.build();
assertTrue(context.isEmpty());
}
Aggregations