Skip to content

Commit bbceb0f

Browse files
authored
Allow whitespace around path expressions in xpath (servo#39410)
Previously servo would allow whitespace in between components of an xpath expression, but not around it. Testing: New web platform tests start to pass Part of servo#34527 --------- Signed-off-by: Simon Wülker <[email protected]>
1 parent 629b7db commit bbceb0f

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

components/script/xpath/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ fn union_expr(input: &str) -> IResult<&str, Expr> {
512512
}
513513

514514
fn path_expr(input: &str) -> IResult<&str, Expr> {
515-
alt((
515+
ws(alt((
516516
// "//" RelativePathExpr
517517
map(
518518
pair(tag("//"), move |i| relative_path_expr(true, i)),
@@ -545,7 +545,7 @@ fn path_expr(input: &str) -> IResult<&str, Expr> {
545545
),
546546
// RelativePathExpr
547547
move |i| relative_path_expr(false, i),
548-
))
548+
)))
549549
.parse(input)
550550
}
551551

tests/wpt/meta/domxpath/lexical-structure.html.ini

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)