Parser ignoring IsKeepingSourceReferences #16
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
Prerequisites
AngleSharp.Css
for CSS support)Description
Running the parser with XmlParserOptions() { IsKeepingSourceReferences = true, } doesn't actually keep the source references, i looked into the source code and while the HtmlParser checks IsKeepingSourceReferences and assignes the source reference correctly as can be seen here

The xml parser never does that, meaning IElement.SourceReference is always null
Steps to Reproduce
**Expected behavior: IElements should have SourceReference set
**Actual behavior: SourceReference is always null
**Environment details: Linux, .NET 6
Possible Solution
Look into how the HtmlDomBuilder handles it and possibly just copy it, (don't know much about the repo so probably just ignore what i said)
The text was updated successfully, but these errors were encountered: