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

Support Json format #110

Open
ngtrian opened this issue Sep 24, 2018 · 10 comments
Open

Support Json format #110

ngtrian opened this issue Sep 24, 2018 · 10 comments

Comments

@ngtrian
Copy link

ngtrian commented Sep 24, 2018

working with xml, yaml, please add json support

@cweiske
Copy link
Member

cweiske commented Sep 24, 2018

What's your code that is not working?

@ngtrian
Copy link
Author

ngtrian commented Sep 26, 2018

This is my code

{
  "short_name": "Maps",
  "name": "Google Maps",
  "icons": [
    {
      "src": "/images/icons-192.png",
      "type": "image/png",
      "sizes": "192x192"
    },
    {
      "src": "/images/icons-512.png",
      "type": "image/png",
      "sizes": "512x512"
    }
  ],
  "start_url": "/maps/?source=pwa",
  "background_color": "#3367D6",
  "display": "standalone",
  "scope": "/maps/",
  "theme_color": "#3367D6"
}

@cweiske
Copy link
Member

cweiske commented Sep 26, 2018

I mean your PHP code.

@ngtrian
Copy link
Author

ngtrian commented Sep 27, 2018

Json also not list support on homepage GeSHi

@cweiske
Copy link
Member

cweiske commented Sep 27, 2018

JSON is a subset of javascript, so JSON is supported. Either show the actual PHP code instructing geshi to render JSON that does not work, or stop.

@cweiske cweiske closed this as completed Sep 27, 2018
@ngtrian
Copy link
Author

ngtrian commented Sep 27, 2018

No, if set syntax javascript for json, result in same color. I'm trying in http://qbnz.com.

image

Why quickly closed this issue? Instead of discussing further!

@ngtrian
Copy link
Author

ngtrian commented Sep 27, 2018

It should highlight as:
image

@cweiske
Copy link
Member

cweiske commented Sep 27, 2018

So your problem is that keys and values in a JSON document are highlighted with the same color?

@ngtrian
Copy link
Author

ngtrian commented Sep 27, 2018

So your problem is that keys and values in a JSON document are highlighted with the same color?

yes

@cweiske cweiske reopened this Sep 27, 2018
@BenBE
Copy link
Contributor

BenBE commented Oct 1, 2018

With enough hackery using COMMENT_REGEXP you could match the string preceeding the colon and matching the string except for the colon (which should be covered by a lookahead only, not as the actual match).

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

3 participants