Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Check if the text is a json and prettify it #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slopjong
Copy link
Contributor

No description provided.

@slopjong
Copy link
Contributor Author

If something is wrong or bad with the pull request, let me know so that I can improve it. One thing that could you keep from merging is that it's hard-coded instead of making it optional.

@douglasduteil
Copy link
Contributor

I just don't know if it's really necessary in UI.Ace .
I think that specific json treatment might be useful in specific project. Is it a fix? Is it blocking something ?
For me UI.Ace must be just a minimal ace integration into the Angular environment.

@slopjong
Copy link
Contributor Author

In my case the json got always minified on model changes even with ace's json mode enabled. After having a closer look at ace's API and googling for this I read in a google group discussion that this is the way how it should be done.

I'll check the discussion again today/tomorrow and maybe ask some ace guys if I'm yet not 100% sure. If they confirm we should add an option to auto-prettify a json. I did it hard-coded which I'm going to change to an opt-in thingie so that users have their full freedom.

@douglasduteil
Copy link
Contributor

@slopjong can't you give me the links you checked ?
I'm, me too, curious about it

@slopjong
Copy link
Contributor Author

Now as I think of it, I'm currently not totally sure if my issue is caused by something else. I'll do some more testing.

Are you somewhere on irc? I'd like fiddle with jasmine and add some test cases for this kind of "issue", if it is one at all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants