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

Bug in example 1, hello world regex has \\s instead of \s #123

Closed
chrisdolan opened this Issue Jun 29, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@chrisdolan

chrisdolan commented Jun 29, 2014

Code is:

m : Message m.text =~ /^hello(\\s*world)?$/

Code should be:

m : Message m.text =~ /^hello(\s*world)?$/
@chrisdolan

This comment has been minimized.

chrisdolan commented Jun 29, 2014

I started to write a patch for this, but I discovered that the "\s" is in many places in the tests too. Why? I can understand if it's doubled in the docs for markdown, but the tests is extra confusing.

doug-martin added a commit to doug-martin/nools that referenced this issue Feb 25, 2015

v0.4.0
* Fix for issue noolsjs#122 referencing defined class within another defined class
   * Also fixes accessing scoped functions within a defined class.
* Fix for issue noolsjs#119 window was removed from the nools.js file now it is called in the current scope of `this`.
* Allow session.halt even for `match()` noolsjs#143 - @raymondfeng
   * Now if you call `halt()` even if you did not call `matchUntilHalt()`
* Now you can use a function as a constraint (Only applies to rules defined programatically) noolsjs#142 - @raymondfeng
* You can now define types using scope [noolsjs#142](noolsjs#142) - @raymondfeng
* Fix for issue, is the dsl you do not have to escape `\` characters noolsjs#123

@doug-martin doug-martin referenced this issue Feb 25, 2015

Merged

v0.4.0 #144

doug-martin added a commit to doug-martin/nools that referenced this issue Feb 25, 2015

v0.4.0
* Fix for issue noolsjs#122 referencing defined class within another defined class
   * Also fixes accessing scoped functions within a defined class.
* Fix for issue noolsjs#119 window was removed from the nools.js file now it is called in the current scope of `this`.
* Allow session.halt even for `match()` noolsjs#143 - @raymondfeng
   * Now if you call `halt()` even if you did not call `matchUntilHalt()`
* Now you can use a function as a constraint (Only applies to rules defined programatically) noolsjs#142 - @raymondfeng
* You can now define types using scope [noolsjs#142](noolsjs#142) - @raymondfeng
* Fix for issue, is the dsl you do not have to escape `\` characters noolsjs#123
@doug-martin

This comment has been minimized.

Contributor

doug-martin commented Feb 26, 2015

If you are using the DSL you now dont have to escape \ characters inside of a regex, if you are creating the rules programatically you still will have to escape since its a string. Let me know if you have any issues.

-Doug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment