Improve code of patch cafc746
Improve code of patch cafc746

mattberkowitz/prosemirror,adrianheine/prosemirror,adrianheine/prosemirror,kiejo/prosemirror,tzuhsiulin/prosemirror,salzhrani/prosemirror,kiejo/prosemirror,tzuhsiulin/prosemirror,salzhrani/prosemirror,kiejo/prosemirror,adrianheine/prosemirror,salzhrani/prosemirror,tzuhsiulin/prosemirror,mattberkowitz/prosemirror