BlockState CreateHtmlBlock(BlockProcessor state, HtmlBlockType type, int startColumn, int startPosition) { state.NewBlocks.Push(new HtmlBlock(this) { Column = startColumn, Type = type, Span = new(startPosition, startPosition + state.Line.End), NewLine = state.Line.NewLine, });
private BlockState CreateHtmlBlock(BlockProcessor state, HtmlBlockType type, int startColumn, int startPosition) { state.NewBlocks.Push(new HtmlBlock(this) { Column = startColumn, Type = type, // By default, setup to the end of line Span = new SourceSpan(startPosition, startPosition + state.Line.End) }); return(BlockState.Continue); }
private BlockState CreateHtmlBlock(BlockProcessor state, HtmlBlockType type, int startColumn, int startPosition) { state.NewBlocks.Push(new HtmlBlock(this) { Column = startColumn, Type = type, // By default, setup to the end of line Span = new SourceSpan(startPosition, startPosition + state.Line.End), //BeforeWhitespace = state.PopBeforeWhitespace(startPosition - 1), LinesBefore = state.UseLinesBefore(), NewLine = state.Line.NewLine, }); return(BlockState.Continue); }
public static bool scan_html_block_end(HtmlBlockType type, string s, int pos, int sourceLength) { switch (type) { case HtmlBlockType.InterruptingBlockWithEmptyLines: return(_scan_html_block_end_1(s, pos, sourceLength)); case HtmlBlockType.Comment: return(_scan_html_block_end_2(s, pos, sourceLength)); case HtmlBlockType.ProcessingInstruction: return(_scan_html_block_end_3(s, pos, sourceLength)); case HtmlBlockType.DocumentType: return(_scan_html_block_end_4(s, pos, sourceLength)); case HtmlBlockType.CData: return(_scan_html_block_end_5(s, pos, sourceLength)); default: return(false); } }