Fix nested inline if parsing

This should fix the issue in #5661 as reported by @frankmichel, and all tests still pass. I'm not sure if the \B was added to the regex for any particular reason, but if it was just ignore this.

Now lines like `@if ($foo)<span class="@if ($bar)has-class@endif"></span>@endif` will be correctly compiled into `<?php if($foo): ?><span class="<?php if($bar): ?>has-class<?php endif; ?>"></span><?php endif; ?>` whereas previously it was compiled into `<?php if($foo): ?><span class="<?php if($bar): ?>has-class@endif"></span><?php endif; ?>`