src/eric7/Plugins/CheckerPlugins/SyntaxChecker/jsonCheckSyntax.py

branch
eric7
changeset 9507
1f39839655ea
parent 9482
a2bc06a54d9d
child 9653
e67609152c5e
--- a/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/jsonCheckSyntax.py	Fri Nov 11 17:14:21 2022 +0100
+++ b/src/eric7/Plugins/CheckerPlugins/SyntaxChecker/jsonCheckSyntax.py	Fri Nov 11 17:49:06 2022 +0100
@@ -32,23 +32,6 @@
     return jsonSyntaxBatchCheck
 
 
-def normalizeCode(codestring):
-    """
-    Function to normalize the given code.
-
-    @param codestring code to be normalized
-    @type str
-    @return normalized code
-    @rtype str
-    """
-    codestring = codestring.replace("\r\n", "\n").replace("\r", "\n")
-
-    if codestring and codestring[-1] != "\n":
-        codestring += "\n"
-
-    return codestring
-
-
 def jsonSyntaxCheck(file, codestring):
     """
     Function to check a JSON source file for syntax errors.
@@ -175,8 +158,6 @@
             errors), the message, a list with arguments for the message)
     @rtype dict
     """
-    codestring = normalizeCode(codestring)
-
     try:
         json.loads(codestring)
     except json.JSONDecodeError as exc:

eric ide

mercurial