Comments (4)
- am I right in thinking that gumbo is only used for html parsing, and this lib leverages it by in turn taking care of css (computing rendering positions/size/clipping/etc.)?
Yes, gumbo is used to parse html only. CSS are parsed by litehtml itself.
- would you think it would be feasible to adapt the library to use something like BeautifulSoup/JSoup for the html parsing instead of gumbo?
Hmm... this is interesting. I guess this is not a big problem. It is simple to build elements tree from other parser. I'll add this into todo-list 👍
- would you mind if I (try to) port the lib to another language (obviously crediting you and including your license)?
I'll be glad to see ports to another languages.
from litehtml.
Great! 👍
And nice to hear it sounds interesting to you too.
from litehtml.
And please post here if you make any progress in that direction.
from litehtml.
Hi there, and sorry for bumping this up. Just a couple more questions/observations (which really are feature requests :D).
- I can't stress enough how much I like the render-agnostic property of this lib, so what I'd hope for is to have two more interfaces (like
litehtml::document_container
): one for handling html (sayparseHtml(string)
), and one for parsing/applying css (saycomputeStyle(style, doc)
) - I get it could be cumbersome to do (as this may also need an intermediate representation), but I still think that separating the processes could make things easier to work with (and also make it possible to switch libraries for the specific needs)
I know I'm speaking out of my direct needs/hopes, but do these requests seem sensible to you and addressable in the nearest future?
PS: maybe this needs to be a separate issue?!
PPS: main reason for asking this is that there are only a few libs out there (in the opensource zone), that return layout props from css, although many offer to parse html and/or css (with no layout). So mixing&matching them might be very interesting (if only for benchmarking purposes and a common task).
Thanks.
from litehtml.
Related Issues (20)
- -Wreorder compiler warnings HOT 1
- Unhandled enum in switch warnings HOT 3
- Negative top margin changes block height
- Security policy HOT 1
- Windows build is broken. HOT 2
- Something weird with flex layout HOT 2
- import_css blocks the main thread HOT 1
- The token 'and' in a @media selector isn't parsed correctly.
- Litehtml in Claws-mail takes ages parsing a specific HTML e-mail HOT 5
- Windows build warnings HOT 3
- Word wrapping support
- 4-byte utf-8 sequences (emoji) are broken inside litehtml HOT 4
- clarification of offset in gradient.color_points HOT 2
- litehtml::render_item_block - unused variable warning HOT 2
- litehtml::flex_line::distribute_free_space - sum_flex_factors never used: HOT 2
- document_container::draw_solid_fill() and background_layer's is_root HOT 7
- Suggestion: Add a clang-format file for code formatting HOT 1
- Other modernization cleanups? HOT 3
- Table border="0" sending me border widths of 1 HOT 1
- namespace vs. no namespace & proper std includes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from litehtml.