PolicyStat / ckeditor-spell-check-plugin-js-dev-edge

User interface enhancements and beta features for http://ckeditor-spellcheck.nanospell.com . This repo is for nanospell developers and trusted partners to modify and fork plugin.js
Other
0 stars 0 forks source link

Words get mashed together when being walked, if the words are around a nested list #12

Closed caffodian closed 8 years ago

caffodian commented 8 years ago

The nested list doesn't correctly separate words,

therefore

            '<ul>' +
                '<li>foo' +
                    '<ol>' +
                        '<li>bar</li>' +
                    '</ol>' +
                'baz</li>' +
            '</ul>'

returns "foobaz" and "bar" through the wordwalker.

https://github.com/PolicyStat/ckeditor-spell-check-plugin-js-dev-edge/blob/pstat_rewrite/tests/typowalking/wordwalker.js#L138

caffodian commented 8 years ago

To run this test, remove it from the ignore:

https://github.com/PolicyStat/ckeditor-spell-check-plugin-js-dev-edge/blob/pstat_rewrite/tests/typowalking/wordwalker.js#L16

caffodian commented 8 years ago

I think this can cause weird bugs on occasion, because it's not actually possible to create a range to mark the misdetected "foodbaz" word

caffodian commented 8 years ago

One way might be to have walkers end if they run into one of those nested blocks that we skip, then find a way to create a new walker that starts after the nested block?

But then I suspect there are probably very degenerate cases where someone nests multiple different lists or other skippable blocks, inside a single list item.

caffodian commented 8 years ago

fixed by #15