Question

I'm working on a website and use Notepad++ for coding. I recently came across some sort of comment notation using forward slash and two asterisks /** */ This is apparently used to collapse everything within the container

function foo(){
    //some script
    /***/
    //even more script

    //another line
    }
//text outside function

when collapsed it will look like this

function foo(){
    //some script
    /***/
//text outside function

I have written some comments which Notepad++ interprets as these and it becomes a problem when I try to collapse the function. When I do the rest of the script is collapsed including the ending </script> tag

  function foo(){
<!--HTML code-->

This only works in JavaScript and I haven't found any way to disable it. Notepad++ allows "user-defined language" but it only seems to be able to add notations, not change existing.

Is there any way I can disable this?

Was it helpful?

Solution

Notepad++ gives no options for built-in language lexers. They are in fact part of underlying Scintilla project.

So, if you are not keen enough to change built-in lexer by yourself, then the answer for you is there is no way. Otherwise find your lexer in scintilla\lexers\ folder in N++ source package and start playing with it. (And if you find solution to effectively solve the problem with /***/, you might consider contributing it back to Scintilla project.) Third option is to chcek Scintilla Bug tracker and if this problem is not reported already, you can create a new bug report.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top