Fixes bug where typing "*notalist* " will create a list

Fixes https://github.com/guardian/scribe-plugin-smart-lists/issues/14

Adds a check to make sure the cursor is in the right position when typing the space key to create a list.
Afraid not :-(

On 20 September 2014 23:43, Brad Vogel <notifications@github.com> wrote:

> In src/scribe-plugin-smart-lists.js:
>
> > @@ -82,7 +82,8 @@ define(['scribe-common/src/element'], function (element) {
> >            // Failing Firefox tests
> >
> >            var startOfLineIsUList = isUnorderedListChar(container.textContent[0]);
> > -          if (isUnorderedListChar(lastChar) && currentChar === 'Space' && startOfLineIsUList) {
> > +          var cursorIsInSecondPosition = selection.range.endOffset === 1;
>
> Yeah, I wasn't sure of a better approach. Any suggestions?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/guardian/scribe-plugin-smart-lists/pull/15/files#r17821914>
> .
>