Leandro Pereira

Results 125 comments of Leandro Pereira

Regarding the `%Element{}` and CSS comment, just a note that `open_browser/2` always includes `head` that contains the CSS link, for example in a new app you'll see this node in...

> but this is not true You're correct, currently that's not true. Those 2 options are quite new and didn't exist when the docs were written. > this would be...

@peaceful-james it seems like using https://docs.rs/rustler/latest/rustler/env/struct.OwnedEnv.html allows to access the current env so it could call an Elixir function from the Rust side, ie: ``` image_url_rewriter: fn url -> "https://safe.example.com?url=#{url}"...

There's gonna be some overhead but I don't think that would be too much to the point of being a blocker.

In this particular case `:image_url_rewriter` could initially just accept a string in the format used by Rust so the integration is just passing a string forward to Rust which does...

Btw `:link_url_rewriter` can be implemented the same since they both use the same trait that only receives a `&str`

If you wanna take a shot, a PR is welcome :)

FWIW Claude, Cursor, and friends have been quite helpful 😄

> We could also verify the format string's syntax as soon as it's found in the options That's interesting. What would be a pragmatic way to do so? Idk if...

Gotcha that makes sense, so we can at least provide some warning instead of blindly crashing. In the Elixir side, we're used to HEEx templates where we have snippets like...