Skip to content

Update javascript.js to better match javascript(embedded) in all themes#17347

Closed
pryrt wants to merge 5 commits intonotepad-plus-plus:masterfrom
pryrt:javascriptTheme
Closed

Update javascript.js to better match javascript(embedded) in all themes#17347
pryrt wants to merge 5 commits intonotepad-plus-plus:masterfrom
pryrt:javascriptTheme

Conversation

@pryrt
Copy link
Contributor

@pryrt pryrt commented Dec 29, 2025

per https://community.notepad-plus-plus.org/post/104325 and #17299 (comment) , v8.9 surprised users of javascript.js language, because <=v8.8.8, it used "magic" to inherit styling from embedded javascript when javascript.js was missing; since v8.9 doesn't have "missing" language lexers anymore, the new default-only colors for the added javascript.js made it look like javascript.js was broken. Replicate the colors from embedded javascript to javascript.js for all themes, so that someone who upgrades from <=v8.8.8 to v8.9.1 will not get confused by javascript.js anymore.

<WordsStyle name="USER KEYWORDS 8" styleID="135" fgColor="FF6600" bgColor="000000" fontName="" fontStyle="1" fontSize="" keywordClass="substyle8" />
<WordsStyle name="PREPROCESSOR COMMENT" styleID="23" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="PREPROCESSOR COMMENT DOC" styleID="24" fgColor="FFFFFF" bgColor="000000" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="PREPROCESSOR" styleID="9" fgColor="C0C0C0" bgColor="000000" fontName="" fontStyle="0" fontSize=""></WordsStyle>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Black.xml and vim Dark Blue.xml contain unneeded changes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it is missing space before "/>"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that, and was already fixing it.

Official Vim Zenburn home page: http://kippura.org/zenburnpage/
Supported languages: All the languages supported by release 7.7
Created by: Jani Kesänen (jani dot kesanen gmail com)
Created by: Jani Kesänen (jani dot kesanen gmail com)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to failed encoding conversion this will increase file size.

Could you fix it by using Jani Kesänen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately changing style in in styler will again trigger this corruption. So it seems that upgrade to tinyxml2 will be needed.

Copy link
Contributor Author

@pryrt pryrt Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's beyond the scope of this PR, obviously. ;-)

I assumed you'd be getting to that eventually, since you've been working on converting the other XML processing to tinyxml2. :-) (When you do get around to implementing that, make sure you see whether tinyxml2 has an option to make newlines consistent between the main file and comments, because it's tinyxml1 that caused the comment:LF-vs-document:CRLF difference from your first comment to this PR.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be ok, with _wfopen_s tinyxml2 should save file with CRLF

@chcg chcg added the theme theming related issues label Dec 31, 2025
@donho donho self-assigned this Jan 4, 2026
@donho donho added the accepted label Jan 4, 2026
@donho donho closed this in e65ec3b Jan 4, 2026
@pryrt pryrt deleted the javascriptTheme branch January 4, 2026 18:52
@ozone10
Copy link
Contributor

ozone10 commented Jan 15, 2026

@pryrt
theme update logic still needs take into account issue with missing javascript style. Currently users with old themes will have them updated with no syntax highlight.

pryrt added a commit to pryrt/notepad-plus-plus that referenced this pull request Jan 16, 2026
per notepad-plus-plus#17347 (comment), need to specially handle the colors for old themes that were missing JavaScript.js, otherwise users will think that N++ broke their themes (which used to work due to the magic handling of missing-JavaScript.js-uses-embedded-JavaScript-lexer)
donho pushed a commit that referenced this pull request Jan 17, 2026
per #17347 (comment), need to specially handle the colors for old themes that were missing JavaScript.js, otherwise users will think that N++ broke their themes (which used to work due to the magic handling of missing-JavaScript.js-uses-embedded-JavaScript-lexer)

Fix #17347 (comment)
Close #17409
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted theme theming related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants