Skip to content

Fix invalid json with escapes#10

Open
keith wants to merge 1 commit into
objective-see:masterfrom
keith:ks/fix-invalid-json-with-escapes
Open

Fix invalid json with escapes#10
keith wants to merge 1 commit into
objective-see:masterfrom
keith:ks/fix-invalid-json-with-escapes

Conversation

@keith
Copy link
Copy Markdown

@keith keith commented Oct 9, 2022

If your command opening a file contained some regex such as:

grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$' foo.txt

The json would fail to pretty print because of the invalid escape sequences. This escapes those manually.

If your command opening a file contained some regex such as:

```
grep -iqE '^[^TXZ ]+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$' foo.txt
```

The json would fail to pretty print because of the invalid escape
sequences. This escapes those manually.
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

Successfully merging this pull request may close these issues.

1 participant