Skip to content

Commit 7493e4b

Browse files
Remove legacy code commented in #554
1 parent 482e15c commit 7493e4b

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

src/HtmlAgilityPack.Shared/HtmlAttribute.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public class HtmlAttribute : IComparable
3636
internal string _value;
3737
internal int _valuelength;
3838
internal int _valuestartindex;
39-
//internal bool _isFromParse;
40-
//internal bool _hasEqual;
4139
private bool? _localUseOriginalName;
4240

4341
#endregion
@@ -291,8 +289,6 @@ public HtmlAttribute Clone()
291289
att._quoteType = _quoteType;
292290
att.InternalQuoteType = InternalQuoteType;
293291

294-
//att._isFromParse = _isFromParse;
295-
//att._hasEqual = _hasEqual;
296292
return att;
297293
}
298294

src/HtmlAgilityPack.Shared/HtmlDocument.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,7 +1525,6 @@ private void Parse()
15251525
if (_c == '=')
15261526
{
15271527
PushAttributeNameEnd(_index - 1);
1528-
//_currentattribute._hasEqual = true;
15291528
_state = ParseState.AttributeAfterEquals;
15301529
continue;
15311530
}
@@ -1573,7 +1572,6 @@ private void Parse()
15731572

15741573
if (_c == '=')
15751574
{
1576-
//_currentattribute._hasEqual = true;
15771575
_state = ParseState.AttributeAfterEquals;
15781576
continue;
15791577
}

src/HtmlAgilityPack.Shared/HtmlNode.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,13 +2346,12 @@ internal void WriteAttribute(TextWriter outText, HtmlAttribute att)
23462346
}
23472347

23482348
var quoteType = OwnerDocument.GlobalAttributeValueQuote ?? att.QuoteType;
2349-
//var isWithoutValue = quoteType == AttributeValueQuote.WithoutValue
2350-
// || (quoteType == AttributeValueQuote.Initial && att._isFromParse && !att._hasEqual && string.IsNullOrEmpty(att.XmlValue));
23512349

2352-
if (quoteType == AttributeValueQuote.Initial/* && !(att._isFromParse && !att._hasEqual && string.IsNullOrEmpty(att.XmlValue))*/)
2350+
if (quoteType == AttributeValueQuote.Initial)
23532351
{
23542352
quoteType = att.QuoteType;
23552353
}
2354+
23562355
var isWithoutValue = quoteType == AttributeValueQuote.WithoutValue;
23572356

23582357
string name;

0 commit comments

Comments
 (0)