From here until the part when we actually do the block commenting, the code is completely different, which might make it easier to read the actual code and not this diff. This [comment](https://github.com/adobe/brackets/pull/3060#issuecomment-15706328) can explain better how it works.