diff --git a/src/HtmlAgilityPack.Shared/HtmlDocument.cs b/src/HtmlAgilityPack.Shared/HtmlDocument.cs
index 2b0eb91e..7ed5d4e4 100644
--- a/src/HtmlAgilityPack.Shared/HtmlDocument.cs
+++ b/src/HtmlAgilityPack.Shared/HtmlDocument.cs
@@ -157,10 +157,13 @@ public static bool DisableBehaviorTagP
///
public bool OptionOutputAsXml;
- ///
- /// If used together with and enabled, Xml namespaces in element names are preserved. Default is false.
- ///
- public bool OptionPreserveXmlNamespaces;
+ // NEED TEXT!
+ public bool DisableImplicitEnd;
+
+ ///
+ /// If used together with and enabled, Xml namespaces in element names are preserved. Default is false.
+ ///
+ public bool OptionPreserveXmlNamespaces;
///
/// Defines if attribute value output must be optimized (not bound with double quotes if it is possible). Default is false.
@@ -1836,8 +1839,8 @@ private void CloseParentImplicitExplicitNode()
// CHECK if parent must be implicitely closed
if (IsParentImplicitEnd())
{
- if (OptionOutputAsXml)
- {
+ if (OptionOutputAsXml || DisableImplicitEnd)
+ {
forceExplicitEnd = true;
}
else