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

Update from dzhibas/SublimePrettyJson@master #1

Open
wants to merge 91 commits into
base: master
Choose a base branch
from

Conversation

evandrocoan
Copy link
Member

The upstream repository dzhibas/SublimePrettyJson@master has some new changes that aren't in this fork. So, here they are, ready to be merged!

This Pull Request was created programmatically by the githubpullrequests.

tadashi-aikawa and others added 30 commits December 18, 2016 21:14
When finding array matches only the content of the array is replaced. This content can potentially be present in multiple places and will then break later array replacements. The below example can reproduce the issue:
{
  "test": [3, 4],
  "test2": [1, 2, 3, 4],
  "test3": [3, 4]
}

With setting "keep_arrays_single_line": true

Basically the issue occurs for two arrays A, B where A is a suffix of B and A occurs earlier in the JSON document than B.
The fix is to match the whole array, not just the content. Then remove the brackets to split and join and re-add the brackets afterwards.
If the same array occurs multiple times then this will replace all instances during the first replace, however that should not cause any issues.
The fix prevents issues with replacing arrays that are subsets of other arrays.
… Added docs about how to configure the reindent_block setting
When parse an array with config `keep_arrays_single_line = true`, `output_json.replace(m, replacement)` will replace more than once if another array is a subset of current.
Example:
```{"a": [1],"b": [2,3,1]}```
should be parsed like: 
```
{
    "a": [1],
    "b": [2, 3, 1]
}
```
but actually got 
```
{
  "a": [1],
  "b": [
    2,
    3,1]
}
```
remove: Sublime Text 2 Support
fix: JSON syntax package location for ST4
fix: empty region logic
implement: .gitattributes
implement: .python-verison
implement: f'strings

fix: libs -> lib
fix: Sublime Menus
implement: #42
update: unit tests
rchl and others added 13 commits December 8, 2021 21:24
Hide sidebar in JQ window as it serves no purpose
Update Documentation of The Configuration Options
Fix check for whether jq is installed in the system
- Fixes#166
- Setting to control format of invalid JSON Fixes #171
- Fixes #169
- Fixes #155
This commit converts `PrettyJsonLintListener` into a `ViewEventListener`,
so it contains `self.view` member, required by mixed in `PrettyJsonBaseCommand`
class.
... regardless how many items are in `as_json`.
Disable format on save by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.