本文整理匯總了C#中TidyNet.Lexer.InlineDup方法的典型用法代碼示例。如果您正苦於以下問題:C# Lexer.InlineDup方法的具體用法?C# Lexer.InlineDup怎麽用?C# Lexer.InlineDup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TidyNet.Lexer
的用法示例。
在下文中一共展示了Lexer.InlineDup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Parse
//.........這裏部分代碼省略.........
++lexer.seenBodyEndTag;
Report.Warning(lexer, body, node, Report.CONTENT_AFTER_BODY);
}
/* mixed content model permits text */
if (node.Type == Node.TextNode)
{
if (iswhitenode && mode == Lexer.IgnoreWhitespace)
{
continue;
}
if (lexer.Options.EncloseText && !iswhitenode)
{
Node para;
lexer.UngetToken();
para = lexer.InferredTag("p");
Node.InsertNodeAtEnd(body, para);
TidyNet.ParserImpl.parseTag(lexer, para, mode);
mode = Lexer.MixedContent;
continue;
}
else
{
/* strict doesn't allow text here */
lexer.versions &= ~ (HtmlVersion.Html40Strict | HtmlVersion.Html20);
}
if (checkstack)
{
checkstack = false;
if (lexer.InlineDup(node) > 0)
{
continue;
}
}
Node.InsertNodeAtEnd(body, node);
mode = Lexer.MixedContent;
continue;
}
if (node.Type == Node.DocTypeTag)
{
Node.InsertDocType(lexer, body, node);
continue;
}
/* discard unknown and PARAM tags */
if (node.Tag == null || node.Tag == tt.TagParam)
{
Report.Warning(lexer, body, node, Report.DISCARDING_UNEXPECTED);
continue;
}
/*
Netscape allows LI and DD directly in BODY
We infer UL or DL respectively and use this
boolean to exclude block-level elements so as
to match Netscape's observed behaviour.
*/
lexer.excludeBlocks = false;
if (!((node.Tag.Model & ContentModel.Block) != 0) && !((node.Tag.Model & ContentModel.Inline) != 0))
{