コード例 #1
0
            public bool IsBlockElement()
            {
                if (_isBlockElement == TriState.Undefined)
                {
                    _isBlockElement = this.NodeType == XmlNodeType.Element &&
                                      !InlineElements.Contains(GetNamespaceName())
                                      ? TriState.True : TriState.False;;
                }

                return(_isBlockElement == TriState.True);
            }
コード例 #2
0
 // In reality this algoritm is significantly more complex
 private static bool ShouldTrimTextContent(IElement element) => !InlineElements.Contains(element.TagName);