File tree 5 files changed +15
-1
lines changed
externals/jsonlint/src/Seld/JsonLint
5 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ insert_final_newline = true
11
11
trim_trailing_whitespace = false
12
12
insert_final_newline = false
13
13
14
+ [src/parser/__tests__/json/* .data ]
15
+ insert_final_newline = false
16
+
14
17
[src/parser/__tests__/languageguesser/* ]
15
18
indent_style =
16
19
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class JsonLintLexer
20
20
private $ rules = array (
21
21
0 => '/^\s+/ ' ,
22
22
1 => '/^-?([0-9]|[1-9][0-9]+)(\.[0-9]+)?([eE][+-]?[0-9]+)?\b/ ' ,
23
- 2 => '{^"( \\\\["bfnrt/ \\\\]| \\\\u[a-fA-F0-9]{4}|[^\0-\x09\x0a-\x1f \\\\"])*"} ' ,
23
+ 2 => '{^"(?: \\\\["bfnrt/ \\\\]| \\\\u[a-fA-F0-9]{4}|[^\0-\x09\x0a-\x1f \\\\"]+ )*"} ' ,
24
24
3 => '/^\{/ ' ,
25
25
4 => '/^\}/ ' ,
26
26
5 => '/^\[/ ' ,
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ public function testValidJSON() {
22
22
'{"test":"http:\/\/foo \\\\zomg"} '
23
23
=> array ('test ' => 'http://foo \\zomg ' ),
24
24
'["http:\/\/foo \\\\zomg"] ' => array ('http://foo \\zomg ' ),
25
+ Filesystem::readFile (dirname (__FILE__ ).'/json/base64.json ' ) => array (
26
+ 'action ' => 'candidate.create ' ,
27
+ 'actionId ' => '80653a26cc46357ff79ff83b47e27c3cb7a668bd ' ,
28
+ 'params ' => array (
29
+ 'attachments ' => array (
30
+ Filesystem::readFile (dirname (__FILE__ ).'/json/base64.data ' ),
31
+ ),
32
+ ),
33
+ ),
25
34
);
26
35
27
36
foreach ($ tests as $ input => $ expect ) {
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments