cli icon indicating copy to clipboard operation
cli copied to clipboard

VSCode Plugin and CLI doesn't translate the html code into rsx

Open kovunov opened this issue 2 years ago • 0 comments

When I am trying to translate valid html into rsx I am getting this output and error messages. Html code:

<html>

<head>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

<body>
    <div id="main"> </div>
</body>

</html>

Using the Dioxus plugin in vs code when translating this selection results in the following message: [33m[[33mWARN[0m[33m] You appear to be creating a Dioxus project from scratch; we will use the default config[0m Using dioxus translate -f index.html results in the error:

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /Users/T982696/.cargo/registry/src/github.com-1ecc6299db9ec823/dioxus-autofmt-0.3.0/src/element.rs:279:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Using dioxus-cli version 0.3.2

Otherwise, project build, using tailwind, etc. worked correctly for me, I really like the framework, though functionality to easily translate html code into rsx is crucial. Thanks for the help.

kovunov avatar May 27 '23 20:05 kovunov