Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Json file hightlight

Open liux-pro opened this issue 3 years ago • 5 comments

{
	"lint:js": "eslint",
	"abc":"xyz"
}

Json like this in notepad3 highlight show image

If there is : in key of json object ,hight light not work

liux-pro avatar Jan 16 '22 06:01 liux-pro

The JSON lexer is also a JSON-LD lexer

https://github.com/rizonesoft/Notepad3/blob/c67abccf82570ce5a0021c3f2b2be9de6213ea98/lexilla/lexers_x/LexJSON.cxx#L5

A string in the form prefix:suffix matches a compact IRI in JSON-LD

BTW, if the property name contains an extra colon, it won't match the JSON-LD syntax anymore:

notepad3_dark_theme_package json

rdipardo avatar Jan 26 '22 18:01 rdipardo

Hello @liux-pro ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.22.128.3_beta.paf" or newer, see 1st list in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.22.128.3_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Jan 28 '22 18:01 hpwamr

The real fix was made in https://github.com/rizonesoft/Notepad3/commit/76cbde59beaba3cd26ea3110f8546ac81b49aa03.

The last beta release doesn't have a dedicated style for npm scripts that match with SCE_JSON_COMPACTIRI:

notepad3_v5 22 128 3_beta

Notepad3 (x64) v5.22.128.3 beta (dkt1-amr)
Compiler: MS Visual C++ 2022 v17.0.5 (VC v1930)
OS Version: Windows 11  Version 21H2 (Build 22000)
Windows Colors 'Dark-Mode' Theme is SUPPORTED and SELECTED.
Scintilla v515
Lexilla v514
Oniguruma v7.0.0
- Process is not elevated
- User is not in Admin-Group
- Locale -> en-US (CP:'ANSI (CP-65001)')
- Current Encoding -> 'Unicode (UTF-8)'
- Dark-Mode enabled -> YES
- Screen-Resolution -> 1920 x 1080 [pix]
- Display-DPI -> 120 x 120  (Scale: 125%).
- Rendering-Technology -> 'DIRECT-WRITE'
- Zoom -> 100%.
- Current Lexer -> 'JSON'

rdipardo avatar Jan 29 '22 04:01 rdipardo

The real fix was made in 76cbde5.

Hello @liux-pro , @rdipardo ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.22.129.1_beta.paf" or newer, see 1st list in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.22.129.1_beta_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Jan 29 '22 10:01 hpwamr

5.22.129.1 styles everything as intended 👍🏼

It might be better if the default SCE_JSON_COMPACTIRI style reused the SCE_JSON_PROPERTYNAME style.

It's not my issue, but I think @liux-pro was expecting all property names to look the same. Switching into a JSON-LD style in the middle of a plain JSON document is a potential source of confusion.

It's also a bit harder to see the colon separators next to compact IRIs; by default they're practically the same colour:

notepad3_dark_5 22 129 1_beta

notepad3_5 22 129 1_beta

Notepad3 (x64) v5.22.129.1 beta (dkt1-amr)
Compiler: MS Visual C++ 2022 v17.0.5 (VC v1930)
OS Version: Windows 11  Version 21H2 (Build 22000)
Windows Colors 'Dark-Mode' Theme is SUPPORTED and SELECTED.
Scintilla v515
Lexilla v514
Oniguruma v7.0.0
- Process is not elevated
- User is not in Admin-Group
- Locale -> en-US (CP:'ANSI (CP-65001)')
- Current Encoding -> 'Unicode (UTF-8)'
- Dark-Mode enabled -> NO
- Screen-Resolution -> 1920 x 1080 [pix]
- Display-DPI -> 120 x 120  (Scale: 125%).
- Rendering-Technology -> 'DIRECT-WRITE'
- Zoom -> 100%.
- Current Lexer -> 'JSON'

rdipardo avatar Jan 29 '22 22:01 rdipardo

Hello @liux-pro , @rdipardo ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_5.22.1228.1_rc2.paf" or newer, see in issue #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_5.22.1228.1_rc2_Setup" or newer, see the 2nd list in issue #1129.

Comments and suggestions are welcome... 😃

hpwamr avatar Dec 28 '22 19:12 hpwamr