Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fbe070a

Browse files
committed
cleaning up: key & value can never be null in ExtractAttributes
1 parent d90a97a commit fbe070a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/HtmlRenderer/Core/Parse/HtmlParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private static void ExtractAttributes(string source, int idx, int length, out Di
246246
value = HtmlUtils.DecodeHtml(value);
247247
}
248248

249-
if (!string.IsNullOrEmpty(key) && (value != null))
249+
if (key.Length != 0)
250250
{
251251
if (attributes == null)
252252
attributes = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);

0 commit comments

Comments
 (0)