prosemirror-markdown 1.14.0: emphasis around a link with edge whitespace serializes to invalid Markdown

import {schema, defaultMarkdownSerializer} from 'prosemirror-markdown'
const link = schema.marks.link.create({href: 'u'}), strong = schema.marks.strong.create()
const doc = schema.node('doc', null, [schema.node('paragraph', null, [
  schema.text('see '), schema.text('word ', [link, strong]), schema.text('next')])])
console.log(defaultMarkdownSerializer.serialize(doc))

1.13.9: see **[word](u)** next

1.14.0: see **[word ](u)**next

The closing ** is preceded by ) and followed by n, so it isn’t right-flanking, and markdown-it renders see **<a href="u">word </a>**next. Leading whitespace ('see', ' word') and em behave the same way. It started with 13f197ac.

P.S. I tried to file this on the issue tracker, but logging in there with GitHub ended in a 500 error.

Thanks for the report. I’ve overhauled the way whitespace expelling works, because the old approach couldn’t handle things like this very well without becoming even more obscure and complex.

Weird. When I try a GitHub login it works, but I suspect in some cases the Anubis bot-blocker might interfere.

Thanks for the fix!