Well, here I am again.
I fiddled arround with this code, and I think I have a slightly better description now:
The main problem seems to be the inclusion of a *.js-script with code like
<script src=“any_name.js”></script>
Textual insertion of the content of such script into an ordinary section
<script> any javascript </script>
makes the problem vanish. So we have workarround.
The bug itself seems to behave like this:
If a node of type <script>…</script> is shown expanded, no function under this node is given a collapse button.
If you do any edit to the text of the script some nodes will appear, but only below the point of edit.
If you collapse and expand the enclosing script node, the icons inside the script are unvisible again.
Nodes inside the script may be functional or may misbehave: Sometimes they don’t collapse the function, but they close the whole enclosing script-node. I can’t see a rule for that.
For reference:
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="cookie-demo.js"></script> <title>Demo8</title> </head> <body> <script> "use strict"; function dummy1(){ var dummy=0; } function dummy2(){ var dummy=0; } function dummy3(){ var dummy=0; } function explain(){ document.writeln("Using Notepad++ no function of this script can be collapsed immediately after expanding the script-node in line 10.<br/>"); document.writeln("There are no icons to be clicked between line number and the text of the line. <br/><br/>"); document.writeln("Any edit inside this script-node will make collapse icons visible, but only below the point of edit.<br/>"); document.writeln("Collapsing and expanding the enclosing node of this script the will make the nodes disappear again.<br/><br/>"); document.writeln("Note: Collapsing any function inside this script (after making them appear) will not always yield the correct result: <br/>"); document.writeln("Instead of closing the function desired, the enclosing script node may close. <br/>"); document.writeln("I can't find any rule that controls this behavior.<br/><br/>"); document.writeln("There is only one thing I'm resonably sure of:<br/>"); document.writeln("The whole problem diappears if no *.js-script is included. See line 5 of the header.<br/><br/>"); document.writeln("(This seems to be true for Notepad++. <br/>"); document.writeln("And it is at least in part validated for SciTE text editor as well. Thanks to mere-human!) <br/><br/>"); } explain(); function dummy4(){ var dummy=0; } function dummy5(){ var dummy=0; } function dummy6(){ var dummy=0 } </script> </body> </html>Happy Coding!
Regards,
Harry