use of org.eclipse.mylyn.wikitext.commonmark.internal.SourceBlocks 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.SourceBlocks in project mylyn.docs by eclipse.
the class BlockQuoteBlock method process.
@Override
public void process(ProcessingContext context, DocumentBuilder builder, LineSequence lineSequence) {
builder.setLocator(lineSequence.getCurrentLine().toLocator());
builder.beginBlock(BlockType.QUOTE, new Attributes());
SourceBlocks sourceBlocks = CommonMark.sourceBlocks();
BlockQuoteState blockQuoteState = new BlockQuoteState();
sourceBlocks.process(context, builder, blockQuoteState.blockQuoteLineSequence(lineSequence), blockQuoteState.contextPredicate());
builder.endBlock();
}
use of org.eclipse.mylyn.wikitext.commonmark.internal.SourceBlocks in project mylyn.docs by eclipse.
the class BlockQuoteBlock method createContext.
@Override
public void createContext(ProcessingContextBuilder contextBuilder, LineSequence lineSequence) {
SourceBlocks sourceBlocks = CommonMark.sourceBlocks();
BlockQuoteState blockQuoteState = new BlockQuoteState();
sourceBlocks.createContext(contextBuilder, blockQuoteState.blockQuoteLineSequence(lineSequence), blockQuoteState.contextPredicate());
}
Aggregations