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 in parsing strings when using object as interpreter #642

Closed
jcubic opened this issue Jan 20, 2021 · 0 comments
Closed

Error in parsing strings when using object as interpreter #642

jcubic opened this issue Jan 20, 2021 · 0 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Jan 20, 2021

Issue summary

jQuery Terminal throw error on valid strings when using object as interpreter

Expected behavior

strings are parsed correctly

Actual behavior

invalid JSON exception is thrown

Steps to reproduce

create basic terminal with command as object property function:

var term = $('body').terminal({
  test: (...args) => {
    console.log(args);
    }
  }, {checkArity: false});

Type: test "{\"wrap\": true}" or test '{"wrap": true}'

it throw: Error: Unexpected token w in JSON at position 3

@jcubic jcubic added the Bug label Jan 20, 2021
jcubic added a commit that referenced this issue Feb 3, 2021
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Feb 3, 2021
@jcubic jcubic closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant