Triple-click to select line and apply formatting

On a Mac, I have hardwired muscle memory to triple-click to select and entire line, and then apply formatting. But in Drafts, when I triple-click to select and line and hit cmd-B to make it bold, the “closing” ** (bold formatting notation in markdown) ends up on the next line.

The result is like this:

**This line is bold
**This line is not

This is the end. 

I would expect:

**This line is bold**
This line is not

This is the end. 

Is this a bug? Is this expected behavior with Markdown editors? The triple-click selection seems to extend to the end of the line, if I just highlight the the text of the line and don’t let the selection extend to the end, I get the formatting I expect.

It sounds like the new line character is being included in the selection.

I’ve just tried it on Drafts beta v21.5.28 (Pro) on an iPhone, running iOS 13.6, using an external keyboard and this action, and I get your expected behaviour rather than you observed behaviour.