Fix reg expression for markdown title matching

Add "m" multiline search modifier to allow matching headers that are not located in the first line of content.