Skip to content

Commit e049bd2

Browse files
committed
double slash in paths is a syntax error
1 parent d521c43 commit e049bd2

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/tokenizer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ impl Tokenizer<'_> {
172172
self.ctx.push(Context::InterpolStart);
173173
} else if self.str_since(past).ends_with('/') {
174174
return TOKEN_ERROR;
175+
} else if self.str_since(past).contains("//") {
176+
return TOKEN_ERROR;
175177
} else {
176178
self.pop_ctx(Context::Path);
177179
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
error: unexpected TOKEN_ERROR at 0..9, wanted any of [TOKEN_L_PAREN, TOKEN_REC, TOKEN_L_BRACE, TOKEN_L_BRACK, TOKEN_STRING_START, TOKEN_IDENT]
2+
3+
4+
[email protected] "/foo//bar"
5+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/foo//bar

0 commit comments

Comments
 (0)