Ejemplo n.º 1
0
 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,
     });
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        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);
            }
        }