From 04e17b7375545e395802fdec5eddcf4b1db801ab Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 5 Apr 2022 17:37:42 +0200 Subject: [PATCH] Fix JSON, JavaScript and BaanC syntax highlighting not working regressions Thanks to: https://github.com/notepad-plus-plus/notepad-plus-plus/commit/2113e782fb73076ef0dc3907d8da9ecd3f0a061c#r70489851 --- PowerEditor/src/Notepad_plus.cpp | 1 + PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index e5d5a71de..3f786e38d 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -7234,6 +7234,7 @@ static const QuoteParams quotes[] = {TEXT("Anonymous #189"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("The two most difficult programming challenges are naming things, cache invalidation, and off-by-one errors.\n") }, {TEXT("Anonymous #190"), QuoteParams::slow, false, SC_CP_UTF8, L_TEXT, TEXT("The greatest security vulnerability in any computer system is located between the keyboard and the chair.\n") }, {TEXT("Anonymous #191"), QuoteParams::slow, false, SC_CP_UTF8, L_TEXT, TEXT("My biggest talent is always being able to tell what's in a wrapped present.\n\nIt's a gift.\n") }, + {TEXT("Anonymous #192"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("You can't force someone to love you.\nBut you can lock this person in the basement and wait for him/her to develop Stockholm syndrome.\n") }, {TEXT("xkcd"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("Never have I felt so close to another soul\nAnd yet so helplessly alone\nAs when I Google an error\nAnd there's one result\nA thread by someone with the same problem\nAnd no answer\nLast posted to in 2003\n\n\"Who were you, DenverCoder9?\"\n\"What did you see?!\"\n\n(ref: https://xkcd.com/979/)") }, {TEXT("A developer"), QuoteParams::slow, false, SC_CP_UTF8, L_TEXT, TEXT("No hugs & kisses.\nOnly bugs & fixes.") }, {TEXT("Elon Musk"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("Don't set your password as your child's name.\nName your child after your password.") }, diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index 8121fa508..b53efa440 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -122,10 +122,10 @@ LanguageNameInfo ScintillaEditView::_langNameInfoArray[L_EXTERNAL + 1] = { {TEXT("r"), TEXT("R"), TEXT("R programming language"), L_R, "r"}, {TEXT("jsp"), TEXT("JSP"), TEXT("JavaServer Pages script file"), L_JSP, "html"}, {TEXT("coffeescript"), TEXT("CoffeeScript"), TEXT("CoffeeScript file"), L_COFFEESCRIPT, "coffeescript"}, - {TEXT("json"), TEXT("json"), TEXT("JSON file"), L_JSON, "json "}, - {TEXT("javascript.js"), TEXT("JavaScript"), TEXT("JavaScript file"), L_JAVASCRIPT, "cpp "}, + {TEXT("json"), TEXT("json"), TEXT("JSON file"), L_JSON, "json"}, + {TEXT("javascript.js"), TEXT("JavaScript"), TEXT("JavaScript file"), L_JAVASCRIPT, "cpp"}, {TEXT("fortran77"), TEXT("Fortran fixed form"), TEXT("Fortran fixed form source file"), L_FORTRAN_77, "f77"}, - {TEXT("baanc"), TEXT("BaanC"), TEXT("BaanC File"), L_BAANC, "baan "}, + {TEXT("baanc"), TEXT("BaanC"), TEXT("BaanC File"), L_BAANC, "baan"}, {TEXT("srec"), TEXT("S-Record"), TEXT("Motorola S-Record binary data"), L_SREC, "srec"}, {TEXT("ihex"), TEXT("Intel HEX"), TEXT("Intel HEX binary data"), L_IHEX, "ihex"}, {TEXT("tehex"), TEXT("Tektronix extended HEX"), TEXT("Tektronix extended HEX binary data"), L_TEHEX, "tehex"},