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

problem with json #1025

Closed
Megafarm opened this issue Sep 23, 2016 · 5 comments
Closed

problem with json #1025

Megafarm opened this issue Sep 23, 2016 · 5 comments
Labels

Comments

@Megafarm
Copy link

Megafarm commented Sep 23, 2016

Hi,
i wnat to highlight a json multi array but only the last value is green and the other are red. i want to have all values in green! is there a way to do this ?

example: {"key1":"value1","key2":"value2","key3":"value3"}
--> just value3 is green (edit!! - before: red)

PLEASE HELP ME! :D

@Golmote
Copy link
Contributor

Golmote commented Sep 23, 2016

Hi, could you show us your code so we can investigate this issue?

Also, shouting is not necessary ;)

@Megafarm
Copy link
Author

Megafarm commented Sep 27, 2016

Thanks for replying,
here is the code:

HTML formated:
<pre class=" language-json"><code class=" language-json"><span class="token punctuation">{</span><span class="token property">"message"</span><span class="token operator">:</span><span class="token property">"created new file -all-, value inserted;created new file -24h-, value inserted;created new file -168h-, value inserted;created new file -current-, value inserted;","data"</span><span class="token operator">:</span><span class="token property">"YOUR TEMPERATURE VALUE","ip"</span><span class="token operator">:</span><span class="token property">"YOUR IP-ADDRESS","appid"</span><span class="token operator">:</span><span class="token property">"YOUR APPID","lastinsert"</span><span class="token operator">:</span><span class="token string">"TIME OF UPLOADING"</span><span class="token punctuation">}</span></code> </pre>

HTML unformated:
<pre> <code class="language-json">{"message":"created new file -all-, value inserted;created new file -24h-, value inserted;created new file -168h-, value inserted;created new file -current-, value inserted;","data":"YOUR TEMPERATURE VALUE","ip":"YOUR IP-ADDRESS","appid":"YOUR APPID","lastinsert":"TIME OF UPLOADING"}</code> </pre>

Just the "TIME OF UPLOADING" is green, other red

@LeaVerou
Copy link
Member

Yeah, this looks like a bug on our end. Note that if the JSON was formatted properly, the highlighting works.

@LeaVerou LeaVerou added the bug label Sep 28, 2016
@Golmote
Copy link
Contributor

Golmote commented Sep 28, 2016

Thanks for the code sample. It should be fixed now.

@Megafarm
Copy link
Author

Megafarm commented Sep 29, 2016

Yes, @Golmote

it works now :D

mAAdhaTTah added a commit to mAAdhaTTah/prism that referenced this issue Oct 8, 2016
* gh-pages: (107 commits)
  Reverse prism markup min
  JSON: Fixed issues with properties and strings + added tests. Fix PrismJS#1025
  Fix grammar in Readme
  Update CHANGELOG
  Update APL minified file + update test for iota underbar function
  Add iota underbar (PrismJS#1024)
  Fix typo `Fload` to `Float` in prism-ruby.js (PrismJS#1023)
  Autoloader plugin: don't try to load "none" component. Fix PrismJS#1000
  Optimized block regexps to prevent struggling on large files. Fixes PrismJS#1001
  Revert PrismJS#998 + run normalize-whitespace and remove-initial-line-feed plugins in the before-sanity-check hook. Fix PrismJS#1018 (see issue for discussion)
  Run gulp
  Makes CSS strings greedy. Fix PrismJS#1013
  update min file and reverse core
  add prefix feature for custom class plugin
  Make doctype case insensetive (PrismJS#1009)
  Optimize images (PrismJS#1007)
  Restore `viewBox` to Prism logo (PrismJS#1002)
  Remove unneeded prefixed CSS (PrismJS#989)
  Fix WPD plugin's page
  Fix WPD at-rule detection + don't process if language is not handled + fix plugin's page
  ...

# Conflicts:
#	plugins/show-language/prism-show-language.css
#	plugins/show-language/prism-show-language.js
#	plugins/show-language/prism-show-language.min.js
thesave added a commit to thesave/prism that referenced this issue Oct 14, 2016
* PrismJS/gh-pages:
  update patterns (PrismJS#1032)
  Test suite: fixed missing diff in error message
  Reverse prism markup min
  JSON: Fixed issues with properties and strings + added tests. Fix
PrismJS#1025
  Fix grammar in Readme
  Update CHANGELOG
  Update APL minified file + update test for iota underbar function
  Add iota underbar (PrismJS#1024)
  Fix typo `Fload` to `Float` in prism-ruby.js (PrismJS#1023)
  update min file and reverse core
  add prefix feature for custom class plugin
  add plugin custom class name

# Conflicts:
#	plugins/autoloader/prism-autoloader.min.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants