Formatting a heading shows ## when there is a space at the end

Testing version:

What were you doing:
I type some text without any formatting yet. At the end of the line I (unconciously) type a space. Then I try to change the text to a heading with a shortcut or the menu options Format > Heading.

What happened:
The text is not changed to a heading. In stead, behind the text ## is added (e.g. for a H2).

What did you expect to happen:
I expected the text to change to a Heading.

Thanks for reporting. This is fixed in 2.0.15.