eric6/Plugins/CheckerPlugins/SyntaxChecker/jsCheckSyntax.py

branch
without_py2_and_pyqt4
changeset 7192
a22eee00b052
parent 6942
2602857055c5
child 7256
4ef3b78ebb4e
equal deleted inserted replaced
7191:960850ec284c 7192:a22eee00b052
51 """ 51 """
52 codestring = codestring.replace("\r\n", "\n").replace("\r", "\n") 52 codestring = codestring.replace("\r\n", "\n").replace("\r", "\n")
53 53
54 if codestring and codestring[-1] != '\n': 54 if codestring and codestring[-1] != '\n':
55 codestring = codestring + '\n' 55 codestring = codestring + '\n'
56
57 # Check type for py2: if not str it's unicode
58 # if sys.version_info[0] == 2:
59 # try:
60 # codestring = codestring.encode('utf-8')
61 # except UnicodeError:
62 # pass
63 56
64 return codestring 57 return codestring
65 58
66 59
67 def jsSyntaxCheck(file, codestring): 60 def jsSyntaxCheck(file, codestring):

eric ide

mercurial