diff --git a/README.md b/README.md index efb62c1..8f66807 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ node-argument := prop | value node-children := '{' nodes '}' node-space := ws* escline ws* | ws+ -identifier := [a-zA-Z] [a-zA-Z0-9!#$%&'*+\-./:<>?@\^_|~]* | string +identifier := [a-zA-Z] [a-zA-Z0-9!$%&'*+\-./:<>?@\^_|~]* | string prop := identifier '=' value value := string | raw_string | number | boolean | 'null' diff --git a/src/parser.rs b/src/parser.rs index 66c1fea..d822424 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -55,14 +55,14 @@ pub(crate) fn node(input: &str) -> IResult<&str, Node, KdlParseError<&str>> { )) } -/// `identifier := [a-zA-Z_] [a-zA-Z0-9!#$%&'*+\-./:<>?@\^_|~]* | string` +/// `identifier := [a-zA-Z_] [a-zA-Z0-9!$%&'*+\-./:<>?@\^_|~]* | string` fn identifier(input: &str) -> IResult<&str, &str, KdlParseError<&str>> { alt(( recognize(pair( alt((alpha1, tag("_"))), many0(alt(( alphanumeric1, - recognize(one_of("~!@#$%^&*-_+./:<>?")), + recognize(one_of("~!@$%^&*-_+./:<>?")), ))), )), string,