- for(;depth>0;depth--)
- sgmlCloseTag(file,depth+command_depth,
- environment_stack[depth]);
-
- if(!environment_stack[depth].empty())
- sgmlCloseTag(file,depth+command_depth,
- environment_stack[depth]);
-
+ for(;depth>=0;depth--) {
+ if(!environment_stack[depth].empty()) {
+ if(environment_inner[depth] != "!-- --") {
+ item_name="listitem";
+ sgmlCloseTag(file,command_depth+depth,
+ item_name);
+ if( environment_inner[depth] == "varlistentry")
+ sgmlCloseTag(file,depth+command_depth,
+ environment_inner[depth]);
+ }
+
+ sgmlCloseTag(file,depth+command_depth,
+ environment_stack[depth]);
+ }
+ }
+