Only parse JavaScript functions beginning with function()

This commit is contained in:
Tobie Morgan Hitchcock 2023-03-30 15:19:18 +01:00
parent 3e80aa9914
commit a1d8494de1

View file

@ -287,7 +287,7 @@ fn custom(i: &str) -> IResult<&str, Function> {
}
fn script(i: &str) -> IResult<&str, Function> {
let (i, _) = alt((tag("fn::script"), tag("fn"), tag("function")))(i)?;
let (i, _) = tag("function")(i)?;
let (i, _) = mightbespace(i)?;
let (i, _) = tag("(")(i)?;
let (i, _) = mightbespace(i)?;