diff --git a/valuescript_vm/src/jsx_element.rs b/valuescript_vm/src/jsx_element.rs index e366f44e..14b0908b 100644 --- a/valuescript_vm/src/jsx_element.rs +++ b/valuescript_vm/src/jsx_element.rs @@ -137,7 +137,7 @@ impl fmt::Display for JsxElement { fn write_attributes(f: &mut fmt::Formatter<'_>, attrs: &Vec<(String, Val)>) -> fmt::Result { for (key, val) in attrs { - write!(f, " {}=\x1b[33m\"{}\"\x1b[39m", key, val)?; + write!(f, " {}=\"{}\"", key, val)?; } Ok(()) diff --git a/website/.vscode/settings.json b/website/.vscode/settings.json index b6803770..99f887f1 100644 --- a/website/.vscode/settings.json +++ b/website/.vscode/settings.json @@ -4,7 +4,7 @@ { "rule": "*", "severity": "warn" } ], "editor.codeActionsOnSave": { - "source.fixAll": true + "source.fixAll": "explicit" }, "editor.tabSize": 2 } \ No newline at end of file diff --git a/website/src/playground/files/index.ts b/website/src/playground/files/index.ts index b11e4601..55b7cbd0 100644 --- a/website/src/playground/files/index.ts +++ b/website/src/playground/files/index.ts @@ -4,6 +4,7 @@ import raw from "./raw.ts"; export const orderedFiles = [ "/tutorial/hello.ts", "/tutorial/alsoJavaScript.js", + "/tutorial/alsoJsx.tsx", "/tutorial/valueSemantics.ts", "/tutorial/cantMutateCaptures.ts", "/tutorial/classBehavior.ts", diff --git a/website/src/playground/files/root/tutorial/alsoJsx.tsx b/website/src/playground/files/root/tutorial/alsoJsx.tsx new file mode 100644 index 00000000..e92bd8a4 --- /dev/null +++ b/website/src/playground/files/root/tutorial/alsoJsx.tsx @@ -0,0 +1,14 @@ +// You can also use JSX. + +export default function main() { + return greet("world"); +} + +function greet(name: string) { + return ( +