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:
Andrew Chin
2018-08-11 10:09:34 -04:00
parent ca5e7b8542
commit 156eb24359
2 changed files with 2 additions and 2 deletions

View File

@ -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 {