GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Recognize .jsonc files without implying JSON5 support by leoshone · Pull Request #255 · NPP-JSONViewer/JSON-Viewer Conversation
Contributor
Following the review comment on #251 ("Let's remove Why anything at allNotepad++ maps the The change
if (languageType == LangType::L_JSON) return true; if (languageType == LangType::L_JSON5) { auto fileName = GetCurrentFileName(); StringHelper::ToLower(fileName); return fileName.ends_with(L".jsonc"); } return false; A genuine VerificationMeasured end to end in a real Notepad++ (8.9.6.2, default langs.xml):
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsIsJsonFile() used to accept every L_JSON5 document. Notepad++ maps the
.jsonc extension to the json5 language ("json5 jsonc" share one entry in
the default langs.xml), but that also pulled in genuine .json5 documents,
whose syntax (unquoted keys, single-quoted strings) the parser does not
support: they used to be silently ignored by the plugin and would now be
parsed and reported as an error.
Accept the json5 language for .jsonc files only, so a real .json5 file
keeps behaving exactly as before this change.
Verified end to end: .jsonc and .json5 are both reported as the same
language (86) by Notepad++, the .jsonc document is drawn while the .json5
one is not, and the existing jsonc assertions still pass.
leoshone
added a commit
to leoshone/JSON-Viewer
that referenced
this pull request
…NPP-JSONViewer#255 opened - NPP-JSONViewer#251 was approved and merged - the small-pure-PR strategy works. - Upstream moved to fa8d2b9 (settings saved on exit via writeIfChanged, include reordering) and renamed our TREE_ZOOM key to TREE_ZOOM_LEVEL; documented the consequences for the next integration sync. - NPP-JSONViewer#253/NPP-JSONViewer#254 rebased onto fa8d2b9, all three PRs mergeable again. - NPP-JSONViewer#255 opened for the narrow jsonc recognition, with the forward pointer added to the NPP-JSONViewer#251 thread as planned. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |