本文整理汇总了C#中TidyNet.Lexer.IsPushed方法的典型用法代码示例。如果您正苦于以下问题:C# Lexer.IsPushed方法的具体用法?C# Lexer.IsPushed怎么用?C# Lexer.IsPushed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TidyNet.Lexer
的用法示例。
在下文中一共展示了Lexer.IsPushed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
//.........这里部分代码省略.........
}
if (child.Next != null)
{
child.Next.Prev = child;
}
else
{
child.Parent.Last = child;
}
element.Next = null;
element.Prev = null;
element.Parent = child;
element.Content = child.Content;
element.Last = child.Last;
child.Content = element;
child.Last = element;
for (child = element.Content; child != null; child = child.Next)
{
child.Parent = element;
}
}
}
element.Closed = true;
Node.TrimSpaces(lexer, element);
Node.TrimEmptyElement(lexer, element);
return;
}
/* <u>...<u> map 2nd <u> to </u> if 1st is explicit */
/* otherwise emphasis nesting is probably unintentional */
/* big and small have cumulative effect to leave them alone */
if (node.Type == Node.StartTag && node.Tag == element.Tag && lexer.IsPushed(node) && !node.Isimplicit && !element.Isimplicit && node.Tag != null && ((node.Tag.Model & ContentModel.Inline) != 0) && node.Tag != tt.TagA && node.Tag != tt.TagFont && node.Tag != tt.TagBig && node.Tag != tt.TagSmall)
{
if (element.Content != null && node.Attributes == null)
{
Report.Warning(lexer, element, node, Report.COERCE_TO_ENDTAG);
node.Type = Node.EndTag;
lexer.UngetToken();
continue;
}
Report.Warning(lexer, element, node, Report.NESTED_EMPHASIS);
}
if (node.Type == Node.TextNode)
{
/* only called for 1st child */
if (element.Content == null && !((mode & Lexer.Preformatted) != 0))
{
Node.TrimSpaces(lexer, element);
}
if (node.Start >= node.End)
{
continue;
}
Node.InsertNodeAtEnd(element, node);
continue;
}
/* mixed content model so allow text */
if (Node.InsertMisc(element, node))
{