diff -r 921d070cec82 -r 78dabf542c6b Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py --- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py Sat Feb 03 16:46:32 2018 +0100 +++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py Sat Feb 03 17:34:19 2018 +0100 @@ -26,10 +26,16 @@ except ImportError: pass -VcsConflictMarkerRe = re.compile( - r"""^<<<<<<< .*?=======.*?>>>>>>> .*?$""", - re.MULTILINE | re.DOTALL) - +VcsConflictMarkerRegExpList = ( + re.compile( + r"""^<<<<<<< .*?=======.*?>>>>>>> .*?$""", + re.MULTILINE | re.DOTALL + ), + re.compile( + r"""^<<<<<<< .*?||||||| .?=======.*?>>>>>>> .*?$""", + re.MULTILINE | re.DOTALL + ) +) def initService(): """ @@ -236,14 +242,15 @@ codestring = normalizeCode(codestring) # Check for VCS conflict markers - conflict = VcsConflictMarkerRe.search(codestring) - if conflict is not None: - start, i = conflict.span() - lineindex = 1 + codestring.count("\n", 0, start) - return [{'error': - (file_enc, lineindex, 0, "", - "VCS conflict marker found") - }] + for conflictMarkerRe in VcsConflictMarkerRegExpList: + conflict = conflictMarkerRe.search(codestring) + if conflict is not None: + start, i = conflict.span() + lineindex = 1 + codestring.count("\n", 0, start) + return [{'error': + (file_enc, lineindex, 0, "", + "VCS conflict marker found") + }] if filename.endswith('.ptl'): try: