mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-25 19:11:45 +03:00
Use raw string in paths in webidl-tests generated code
This fixes things on Windows, which uses backslashes in their paths
This commit is contained in:
parent
ca5e7b8542
commit
156eb24359
@ -2033,7 +2033,7 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
if let Some(module) = &import.module {
|
||||
if use_node_require {
|
||||
imports.push_str(&format!(
|
||||
"const {} = require('{}').{};\n",
|
||||
"const {} = require(String.raw`{}`).{};\n",
|
||||
name, module, name_to_import
|
||||
));
|
||||
} else if name_to_import == name {
|
||||
|
@ -28,7 +28,7 @@ fn main() {
|
||||
use wasm_bindgen::prelude::*;
|
||||
use wasm_bindgen_test::*;
|
||||
|
||||
#[wasm_bindgen(module = "{}")]
|
||||
#[wasm_bindgen(module = r"{}")]
|
||||
extern {{
|
||||
fn not_actually_a_function{1}();
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user