When you highlight some text and press ctrl+G (or press the toolbar icon), it's supposed to open the image uploader (then once you upload the image, the selected text becomes the image description).

But there is a bug that I found. If it goes colon, blank line, new line with left square bracket, text that is selected, then instead of opening the uploader, it just adds the part of the post up to that colon to the selection. It also happens if the left square bracket is prefixed with an exclamation point.

In other words, situations that match this regex are affected, where the first capture group (the one at the end) matches the selected text:


Can anyone understand my regex? Or maybe you'd prefer a gif?

Try it here by editing this post, selecting "text", and pressing ctrl+G (or the upload image toolbar icon):


Also try it here:


You must log in to answer this question.

Browse other questions tagged .