yuku / textcomplete

Autocomplete for HTMLTextAreaElement and more.
https://yuku.takahashi.coffee/textcomplete/
MIT License
1.74k stars 303 forks source link

Previous issue spawned a new issue - html tags are ignored in the match #265

Closed jefflevinson closed 4 years ago

jefflevinson commented 8 years ago

I read through the original source code (specifically the getTextFromHeadToCaret) and per the example, it does not seem to pick up html even when it is part of the match criteria. The scenario I have is that I'm using a content editable and the match criteria is this: /(where\<\/span\>\s)(\w*)$/ However, this does not work. When I try to leave the tag out like this: /(where\s)(\w*)$/ textcomplete is never triggered. When I just do this, it works: /(\s)(\w*)&/

I've tried all different types of regex's but with zero luck. Is this a bug or am I doing something wrong?

yuku commented 8 years ago

Please show me what you input to the content editable, and the whole strategy.