We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AngleSharp.Xml
When using GetInnerText the result returned misses linebreaks for the table rows.
GetInnerText
If I use HTMLs "innerText", the linebreaks after each tablerow are correct.
I also tried to add "" after a "" element, but it is ignored. Everything between "" and "" seems to be ignored.
Thanks a lot for the awesome project!
Setup simple Anglesharp example, config like the following:
IConfiguration config = Configuration .Default .WithCss(new CssParserOptions { IsToleratingInvalidSelectors = true, IsIncludingUnknownDeclarations = true, IsIncludingUnknownRules = true, }) .WithRenderDevice(new DefaultRenderDevice { DeviceHeight = 768, DeviceWidth = 1024, });
Then parse the following HTML:
<html> <head> </head> <body> <h2>Test</h2> <table> <tbody> <tr> </tr> <tr> <td>Titel: </td> <td>Herr</td> </tr> <tr> <td>Vorname: </td> <td>Horst</td> </tr> <tr> <td>Nachname: </td> <td>Hammer</td> </tr> </tbody> </table> </body> </html>
The result when going with document.body.innerText from Chrome devtools console:
document.body.innerText
Test Titel: Herr Vorname: Horst Nachname: Hammer
The result from anglesharp GetInnerText:
No response
The text was updated successfully, but these errors were encountered:
The outcome to preserve the table is definitely nice - I don't think we (at the moment) respect the display set to table.
This could certainly be improved (but I am not sure if this is / should be classified as a bug - IIRC we pretty much follow the spec).
Sorry, something went wrong.
Oh ok, since other browsers deal differently with tables, I thought it was out of spec.
But of course, feel free to change this to improvement or feature request or something.
No branches or pull requests
Prerequisites
AngleSharp.Xml
for Xml support)Description
When using
GetInnerText
the result returned misses linebreaks for the table rows.If I use HTMLs "innerText", the linebreaks after each tablerow are correct.
I also tried to add "
" after a "" element, but it is ignored. Everything between "" and "" seems to be ignored.
Thanks a lot for the awesome project!
Steps to Reproduce
Setup simple Anglesharp example, config like the following:
Then parse the following HTML:
Expected Behavior
The result when going with
document.body.innerText
from Chrome devtools console:Actual Behavior
The result from anglesharp
GetInnerText
:Possible Solution / Known Workarounds
No response
The text was updated successfully, but these errors were encountered: