File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ supported."
4141                (or  (: " //" *  nonl) eol)
4242                    (: " /*" *  (or  (not  (any ?* ))
4343                                   (: (+  ?* ) (not  (any ?/ ))))) (+  ?* ) ?/ )
44-                     (: " ," *  (any blank ?\C -j)) (any ?\}  ?\] )))))
44+                     (: " ," *  (any blank space ?\v  ?\u2028  ?\u2029 ))
45+                                   (any ?\}  ?\] )))))
4546               (: " \" " *  (or  (not  (any ?\\  ?\" )) (: ?\\  nonl))) " \" " 
4647          nil  t )
4748    ; ; we matched a comment
Original file line number Diff line number Diff line change 149149
150150(ert-deftest  dap-launch-test--delete-commas ()
151151  (let*  ((orig " {
152-   \" abc\" : 123, 
152+     \" conf\" : [ 
153+         { 
154+           \" a\" : \" b\" ,\t\v\u 00A0 
155+         }, 
156+         { 
157+           \" b\" : \" c\" ,\x D\u 2028\u 2029 
158+         },\u 1680\u 2000\u 2001\u 2002\u 2003\u 2004\u 2005\u 2006 
159+     ],\u 2007\u 2008\u 2009\u 200A\u 202F\u 205F\u 3000 
153160}"  )
154-         (post-exp (dap-launch-test--sanitize-json orig)))
155-     (should  (string=  post-exp " {
156-   \" abc\" : 123 
157- }"  ))))
161+          (expected " {
162+     \" conf\" : [ 
163+         { 
164+           \" a\" : \" b\"\t\v\u 00A0 
165+         }, 
166+         { 
167+           \" b\" : \" c\"\x D\u 2028\u 2029 
168+         }\u 1680\u 2000\u 2001\u 2002\u 2003\u 2004\u 2005\u 2006 
169+     ]\u 2007\u 2008\u 2009\u 200A\u 202F\u 205F\u 3000 
170+ }"  ))
171+     (should  (string=  (dap-launch-test--sanitize-json orig) expected))))
158172
159173(ert-deftest  dap-launch-test--comment-in-string ()
160174  (let  ((orig " \" // orig\" " 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments