rem:  headingsArray[NamedAnchorCount++] = heading; 
add:  headingsArray[NamedAnchorCount++] = heading; } 
context: function FillLinkMenulist(linkMenulist, headingsArray){  var NamedAnchorNodeList = editorShell.editorDocument.anchors;  var NamedAnchorCount = NamedAnchorNodeList.length;  if (NamedAnchorCount > 0)  {    for (var i = 0; i < NamedAnchorCount; i++)      linkMenulist.appendItem("#" + NamedAnchorNodeList.item(i).name);  }   for (var j = 1; j <= 6; j++)  {    var headingList = editorShell.editorDocument.getElementsByTagName("h" + j);    for (var k = 0; k < headingList.length; k++)    {      var heading = headingList.item(k);      // Skip headings that already have a named anchor as their first child      //  (this may miss nearby anchors, but at least we don't insert another      //   under the same heading)      var child = heading.firstChild;      if (child && child.nodeName == "A" && child.name && (child.name.length>0))        continue;      var range = editorShell.editorDocument.createRange();      range.setStart(heading,0);      var lastChildIndex = heading.childNodes.length;      range.setEnd(heading,lastChildIndex);      var text = range.toString();      if (text)      {        // Use just first 40 characters, don't add "...",        //  and replace whitespace with "_" and strip non-word characters        text = "#" + ConvertToCDATAString(TruncateStringAtWordEnd(text, 40, false));        // Append "_" to any name already in the list        while (linkMenulist.getElementsByAttribute("label", text).length)          text += "_";        linkMenulist.appendItem(text);        // Save nodes in an array so we can create anchor node under it later        headingsArray[NamedAnchorCount++] = heading;      }    }  }  if (!linkMenulist.firstChild.hasChildNodes())   {    var item = linkMenulist.appendItem(GetString("NoNamedAnchorsOrHeadings"));    item.setAttribute("disabled", "true");  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/a0885fe3052b87d392163c81f32552d543df0f50/EdDialogCommon.js/buggy/editor/ui/dialogs/content/EdDialogCommon.js