Skip to content

Commit 41b0d35

Browse files
committed
fix(tasks/rulegen): trim quotes from filename (#14283)
All rule generation for `vue` would result into testfiles like: ``` Some(PathBuf::from("'test.vue'")), ``` but it should be: ``` Some(PathBuf::from("test.vue")), ```
1 parent f0e760b commit 41b0d35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tasks/rulegen/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ impl<'a> Visit<'a> for TestCase {
320320
PropertyKey::StaticIdentifier(ident) if ident.name == "filename" => {
321321
let span = prop.value.span();
322322
let filename = span.source_text(&self.source_text);
323+
// trim quotes
324+
let filename = filename.trim_matches('"').trim_matches('\'');
323325
self.filename = Some(filename.to_string());
324326
}
325327
PropertyKey::StaticIdentifier(ident) if ident.name == "languageOptions" => {

0 commit comments

Comments
 (0)