Fix for bug https://github.com/microsoft/vscode-makefile-tools/issues/106.
I was not able to find a way in typescript to timeout or guard the regexp run of exec API. Also I did not think it was worth to create a thread that would run regexp from terminal as a command and kill it when needed.
Instead I am removing the problematic pattern: changing "-------" into "- - - - - - ". I am not removing completely the pattern just so the intermediate preprocessed text looks somewhat similar to the original regarding these lines which usually serve as separation or layout... The "- - - " does not hang or slow down the regexp.exec api.
Fix for bug https://github.com/microsoft/vscode-makefile-tools/issues/106. I was not able to find a way in typescript to timeout or guard the regexp run of exec API. Also I did not think it was worth to create a thread that would run regexp from terminal as a command and kill it when needed. Instead I am removing the problematic pattern: changing "-------" into "- - - - - - ". I am not removing completely the pattern just so the intermediate preprocessed text looks somewhat similar to the original regarding these lines which usually serve as separation or layout... The "- - - " does not hang or slow down the regexp.exec api.