blurymind / YarnClassic

A tool for writing interactive dialogue in games!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spell check underline ignores tabs in text

beaswag opened this issue · comments

the red underline that appears under words the spellcheck doesn't like completely ignores tabs in the original text, resulting in the underline not lining up with the word.

image
image

I think the problem is that the Tab offsets the word and the linter doesnt take that into account at all

This is kind of a hard one to fix due to how tabs and spaces are treated as the same symbol there.

If anyone would like to try a pr, you would need to somehow keep tabs at
https://github.com/YarnSpinnerTool/YarnEditor/blob/master/src/js/libs/spellcheck_ace.js#L72

and account for them all the way to
https://github.com/YarnSpinnerTool/YarnEditor/blob/master/src/js/libs/spellcheck_ace.js#L126

ace editor kind of makes this extra funky too.I couldnt figure out a clean way to fix it, but would welcome one :)