htmlpyever icon indicating copy to clipboard operation
htmlpyever copied to clipboard

which html5ever version use for this project ?

Open LuoZijun opened this issue 8 years ago • 10 comments

https://github.com/tbodt/htmlpyever/blob/master/Cargo.toml#L14-L15

LuoZijun avatar Jul 21 '17 09:07 LuoZijun

My cargo.lock has this:

"checksum html5ever 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a358fef34c3334e92cd34d83ce870a386334e605e7abe987a69a7078a4142c69"
"checksum html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4109e35fec157307b918eb9d5b7018e2fa771aea0c04831e22003ac4722fbd1b"

tbodt avatar Jul 22 '17 04:07 tbodt

@tbodt Oh, very old version ☹️

do you have plan to upgrade html5ever master branch ?

LuoZijun avatar Jul 24 '17 05:07 LuoZijun

I'll be upgrading to the latest version of html5ever that cleanly compiles. Pull requests to upgrade further are welcome.

tbodt avatar Jul 24 '17 18:07 tbodt

@tbodt okay, i'm happy do that with my free time.

LuoZijun avatar Jul 26 '17 04:07 LuoZijun

awesome!

~Theodore

On Jul 25, 2017, at 9:45 PM, LuoZijun [email protected] wrote:

@tbodt okay, i'm happy do that with my free time.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

tbodt avatar Jul 26 '17 19:07 tbodt

@tbodt

https://github.com/LuoZijun/htmlpyever/tree/patch-1

i got some problem about rust macro, and i can't fix them... cloud you help me ?

LuoZijun avatar Aug 01 '17 05:08 LuoZijun

swoops in

jD91mZM2 avatar Aug 01 '17 19:08 jD91mZM2

ignore @therealjoyesh, he doesn't know rust. @legolord208 can probably help though

tbodt avatar Aug 01 '17 19:08 tbodt

errors

Pretty self-explanetory?
In the macro call_if_some, you try to access a field that does not exist

EDIT: Looks like you meant to pass a NodeHandle to the macro - not a html5ever::tree_builder::TreeBuilder<NodeHandle, CallbackTreeSink>

EDIT 2: That wasn't very hard diff

New errors!

errors

EDIT 3: I was so close to saying this was impossible. function

But then I realized I should be able to guide the lifetime manually. I have to take a reference though so I don't move out on it.

diff

Last error!

last error

EDIT 4: Easiest error yet. diff

The only thing left is a bunch of warnings which aren't that difficult to fix most likely.
What do you want me to do with the code?

git diff

jD91mZM2 avatar Aug 01 '17 20:08 jD91mZM2

@legolord208 wow, you are super great. 👍

LuoZijun avatar Aug 02 '17 03:08 LuoZijun