Comments (7)
You can avoid this by changing how you do your expression. Try:
"fu {bar |}baz"
The library can't guess your intent, and it shouldn't assume you mean something other than what you write. So the syntax above is preferred over collpasing whitespace, IMO.
from alexa-app.
I do not think it needs know intentions to when it comes to white space. There is no situation where the utterances API benefits from whitespace beyond a single space character. This includes the tabs that the schema generation currently creates as well. There are advantages to cleaning the white space though, as some of the apps I am running struggle a bit with the 200,000 character mark.
appname.utterances().replace(/\t/g, ' ').replace(/ +/g, ' ').replace(/[-]/g, ' ') does the trick without making the regex a complex multimatch. I will keep using that if you prefer not to collapse white space in the module. I appreciate the library. It is much cleaner than what I had pieced together before.
from alexa-app.
You don't need to post-process to collapse the whitespace if you use the syntax like I mentioned above, where the optional whitespace is included in the {} itself.
I'll take a look at this when I do my next update, but I wanted to be clear that you could avoid the double whitespace now using the existing syntax.
from alexa-app.
Thank you Matt. I did notice that whitespace could be in the options and also tested it and it works well. It didn't seem intuitive and I wanted to kill off the generated tabs so I was using replace already and wanted to mention it to you here. Going to close this though. My bigger issue is the other report, which is number formats having hyphens. That one actually impacts the functionality of the final Alexa app.
from alexa-app.
What is wrong with the tabs? I find them easier than a space character to separate intent names from the utterance, and the tab is valid.
from alexa-app.
Fixed in 2.1.4
from alexa-app.
Thanks for the quick fixes/adjustments Matt. As far as the generated tabs, nothing is wrong with them. I was just replacing them for personal preference. I wanted my utterances to be as compact as possible.
from alexa-app.
Related Issues (20)
- Support for CanFulfillIntentRequest HOT 7
- Errors when using KeepAlive-style CloudWatch events HOT 5
- Patch for directive Dialog.Delegate HOT 2
- Cannot get directive display to work in Alexa skill. HOT 5
- Not able to use alexa-app HOT 2
- APL Support ? HOT 6
- VideoApp Directive HOT 1
- alexa-verifier-middleware HOT 1
- request.userId returning the wrong user HOT 3
- Multi turn dialog
- How we can get user permissions list?
- ssml lowercase
- Firebase Promise Failure HOT 2
- Support for In-Skill Purchases (ISP)? HOT 1
- INVALID_REQUEST_TYPE HOT 3
- Chained callbacks not working. HOT 2
- Issues testing locally the Skill: alexa-app + express + ngrok HOT 2
- Xxxxx
- REPLACE_ALL play behavior has no effect HOT 1
- Catch User Profile Data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alexa-app.