Skip to content

Commit 6bca267

Browse files
quanliu1991RobinPicard
authored andcommitted
update STRING and STRING_INNER support \+/ \+b \+f \+n \+r \+t in json schema
Signed-off-by: quanliu <[email protected]>
1 parent 5ca6b72 commit 6bca267

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/json_schema/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//! in generating a regular expression string based on a given JSON schema.
33
44
// allow `\"`, `\\`, or any character which isn't a control sequence
5-
pub static STRING_INNER: &str = r#"([^"\\\x00-\x1F\x7F-\x9F]|\\["\\])"#;
6-
pub static STRING: &str = r#""([^"\\\x00-\x1F\x7F-\x9F]|\\["\\])*""#;
5+
pub static STRING_INNER: &str = r#"([^"\\\x00-\x1F\x7F-\x9F]|\\["\\/bfnrt])"#;
6+
pub static STRING: &str = r#""([^"\\\x00-\x1F\x7F-\x9F]|\\["\\/bfnrt])*""#;
77
pub static INTEGER: &str = r#"(-)?(0|[1-9][0-9]*)"#;
88
pub static NUMBER: &str = r#"((-)?(0|[1-9][0-9]*))(\.[0-9]+)?([eE][+-][0-9]+)?"#;
99
pub static BOOLEAN: &str = r#"(true|false)"#;

0 commit comments

Comments
 (0)