Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Multiple matches are only supported when in partial mode when any matches input containing skipword #29

Open
kueblc opened this issue Dec 2, 2019 · 1 comment

Comments

@kueblc
Copy link

kueblc commented Dec 2, 2019

Consider this simplified example

// ecolect 0.6.0
const ecolect = require('ecolect')
const en = require('ecolect/language/en')
const { any } = require('ecolect/values')

const intents = ecolect.intentsBuilder(en)
	.intent('catchall')
		.value('any', any())
		.add('{any}')
		.done()
	.build()

// "test a" works fine ("any" == "test")
// "a test" works fine ("any" == "test")
// "test a test" results in `Error: Multiple matches are only supported when in partial mode`
// "test a a" also results in error
// "a a a" also results in error

Additionally, in some situations it seems that after triggering this error, it will break future matching for any expression, including ones that worked previously. I haven't been able to narrow this down yet.

@kueblc
Copy link
Author

kueblc commented Dec 2, 2019

// ecolect 0.6.0
const ecolect = require('ecolect')
const en = require('ecolect/language/en')
const { any, number } = require('ecolect/values')

const intents = ecolect.intentsBuilder(en)
	.intent('test')
		.value('any', any())
		.value('number', number())
		.add('{number} {any}')
		.add('{any} {number}')
		.done()
	.build()

// "test 1" works
// "test test 1" works
// "a 1" works
// "test a 1" errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant