The creator of CodeMirror, Martijn, finally decided to fix the situation with jsx and released a patch. I repackaged his changes into the Brackets extension .
This link has a discussion about injecting into brackets and links to other related discussions.