Meteor-Community-Packages / Meteor-Community-Packages/meteor-autocomplete

Word boundaries on search token?

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
350
Forks
106
PR merge metrics
No merged PRs in 30d

Description

Im currently using this package with almost no issues, however a use case came up in my app where a user may not want the autocomplete template to appear.
Currently I am using the '@' as the starting token, but only want the autocomplete template to appear if it is the start of the word. The token field seems to match any occurance of the character. I have looked through the readme to try and find if there is a way to customize the token field to match an optional whitespace character, but I can't seem to find it. Is it possible to tell the template helper to only appear if there is an optional whitespace character before it or pass the token field a regex to match?

Contributor guide

Open the contributing guide

Research direction

Start with the README's token field and template helper documentation, then trace how the token is matched in the autocomplete behavior. Define the expected handling for an optional whitespace boundary before '@', and consider how completion should behave when '@' occurs inside a word; done means the template appears only for valid word-start tokens.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.