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

JSON highlighter mistake #1204

Closed
kvz opened this issue Oct 12, 2017 · 4 comments
Closed

JSON highlighter mistake #1204

kvz opened this issue Oct 12, 2017 · 4 comments

Comments

@kvz
Copy link

kvz commented Oct 12, 2017

Hi, thanks so much for Prism, we're loving it at Transloadit.

Think I may have found a bug in the JSON parser in case that's helpful. It appears to me that when a value contains a colon, it's mistaken for a key.

Here's a screenshot where it gets confused when a value is :original

screen shot 2017-10-12 at 12 42 34

And here's the full code used, for convenience:

{
  "steps": {
    "imported": {
      "robot": "/s3/import",
      "result": true,
      "key": "xxx",
      "secret": "xxx",
      "bucket_region": "us-east-1",
      "bucket": "demos.transloadit.com",
      "path": "my_folder/snowflake.jpg"
    },
    "exported": {
      "use": ["imported", ":original"],
      "robot": "/s3/store",
      "key": "YOUR_AWS_KEY",
      "secret": "YOUR_AWS_SECRET",
      "bucket_region": "us-east-1",
      "bucket": "demos.transloadit.com"
    }
  }
}

Using prismjs via npm, version: 1.8.1 which is the latest version at the time of writing

@Golmote
Copy link
Contributor

Golmote commented Oct 21, 2017

Thanks for reporting. It should be fixed now. It will be in next release.

@kvz
Copy link
Author

kvz commented Oct 24, 2017

Excellent, thanks so much for the quick fix 👌

Would that be 1.8.4? I just upgraded to 1.8.3 but noticed the same behavior still

@Golmote
Copy link
Contributor

Golmote commented Nov 5, 2017

Yes, it's 1.8.4. I just released it now.

@kvz
Copy link
Author

kvz commented Nov 6, 2017 via email

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

2 participants