public override TextMode ElementTextMode(IHtmlElement element) { if (element == null) { throw new ArgumentNullException("element"); } if (element.AncestorsAndSelf().Any(e => preformatedElements.Contains(e.Name))) { return(TextMode.Preformated); } else if (cdataTags.Contains(element.Name)) { return(TextMode.CData); } else if (nonTextElements.Contains(element.Name)) { return(TextMode.NonText); } else { return(TextMode.Normal); } }
public override TextMode ElementTextMode( IHtmlElement element ) { if ( element == null ) throw new ArgumentNullException( "element" ); if ( element.AncestorsAndSelf().Any( e => preformatedElements.Contains( e.Name, StringComparer.OrdinalIgnoreCase ) ) ) return TextMode.Preformated; else if ( cdataTags.Contains( element.Name ) ) return TextMode.CData; else if ( nonTextElements.Contains( element.Name ) ) return TextMode.NonText; else return TextMode.Normal; }