+OLD CS1 Posted August 6, 2020 Share Posted August 6, 2020 I felt I was hijacking @matthew180's TIdBiT thread by posting updates about the tidbit99.com site, so from here on out I will maintain an independent thread. Beta update to TIdBiT99.com: syntax highlighting in the code input box. The colors do not match the Notepad++ custom language highlighting, yet, and they may not fully when this is committed. You can switch between the enhanced editor and the standard textarea by unchecking the box "Toggle editor". Known issue: REM statements seem break the highlighter. To try this out, use the link: https://tidbit99.com/?test=syntax 2 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted August 8, 2020 Author Share Posted August 8, 2020 I would greatly appreciate if anyone who knows JavaScript can help me with this problem. The highlighter I am using wound up being the lightest-weight and easiest for me to use and configure, but it has not been updated since 2016 and there is a nagging bug causing problems with REM statements. This is what happens: You should be able to view the JavaScript using the designer tools in your browser (F12) or you can check out the project on SourceForge: https://sourceforge.net/projects/editarea/ I used the basic.js file as the template for my tixb.js, and changed line 3 appropriately: 'COMMENT_SINGLE' : {1: 'rem', 2: '!', 3: '//'} Obviously the "//" is for the benefit of TIdBiT syntax. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted August 8, 2020 Share Posted August 8, 2020 It looks like UTF-8 encoded characters that are not properly decoded. Maybe I will look at it tomorrow. 1 Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted August 16, 2020 Author Share Posted August 16, 2020 I have released the syntax highlighter to the wild just because having it in the background bugs me. Just be aware that REM statements break it. If this causes you problems, you can turn off the highlighter by unchecking "Enable" under the input box. In the upcoming weeks I will either have it fixed or I will replace it out-right. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted August 16, 2020 Author Share Posted August 16, 2020 (edited) In regard to the REM statements: it turns out the error only occurs if REM contains any capital letters. Use lower-case REM in your source and the syntax highlighting will work properly. Edge has a neat feature to make a web page into an app. Even after removing and re-adding the app it was caching old data. I fixed that on my end, but here is the catch: in Firefox, REM with any capitalized letters triggers the bug, but in Edge (Chromium engine) and Opera it cannot be lower-case. Edited August 16, 2020 by OLD CS1 WTF Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted August 16, 2020 Author Share Posted August 16, 2020 The problem with REM statements is (seemingly) fixed in a slip-shod way, by putting REM in both upper-case and lower-case in the syntax file. Bah. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.