kronenthaler / mod-pbxproj

A python module to manipulate XCode projects
MIT License
1.2k stars 294 forks source link

Fix build step parsing that includes newlines #344

Closed michalszelagsonos closed 5 months ago

michalszelagsonos commented 5 months ago

This PR fixes https://github.com/kronenthaler/mod-pbxproj/issues/341 where build steps that have newlines that match the escape regex are not quoted correctly.

The fix is to use a negative look ahead in the escape regex to make sure the string doesn't contain new lines. If it does, run it through the usual escape logic which produces correct results.