anchor.diff:  sort_index(["mod", _, M1, _], ["mod", _, M2, _]) ->
       string:to_lower(M1) < string:to_lower(M2);
   sort_index(_, _)                                 -> false.
  -    
  +
   javascript_index(Conf, FIndex) ->
   
       log("Creating erldocs_index.js ...~n"),
  -    
  +
       F = fun([Else, App, NMod, Sum]) ->
                   [Else, App, NMod, string:substr(Sum, 1, 50)]
           end,
  -    
  +
       Index = lists:sort( fun(X, Y) -> sort_index(X, Y) end,
                           [ F(X) || X <- FIndex ] ),
       Js    = fmt("var index = ~p;", [Index]),
  -    
  +
       ok = file:write_file([dest(Conf), "/erldocs_index.js"], Js).
   
   render(cref, App, Mod, Xml, Conf, Tpl) ->
       render(erlref, App, Mod, Xml, Conf, Tpl);
   
   render(erlref, App, Mod, Xml, Conf, Tpl) ->
  -    
  +
       File = filename:join([dest(Conf), App, Mod ++ ".html"]),
       ok   = filelib:ensure_dir(filename:dirname(File) ++ "/"),
  -    
  +
       Acc = [{ids,[]}, {list, ul}, {functions, []}],
       {[_Id, _List, {functions, Funs}], NXml}
           = render(fun tr_erlref/2,  Xml, Acc),
  -    
  +
       XmlFuns = [{li, [], [{a, [{href, "#"++X}], [X]}]}
                   || X <- lists:reverse(Funs) ],
  -        
  +
       Args = [{base,    "../"},
               {title,   Mod ++ " - " ++ kf(name, Conf)},
               {content, xml_to_str(NXml)},
               {funs,    xml_to_str({ul, [{id, "funs"}], XmlFuns})}],
  -    
  +
       ok = file:write_file(File, file_tpl(Args, Tpl)).
   
   render(Fun, List, Acc) when is_list(List) ->
  -    case io_lib:char_list(List) of 
  +    case io_lib:char_list(List) of
           true  ->
               {Acc, List};
           false ->
  
positive.code:             ok = file:set_cwd(OldDir),
              throw({Type, Err})
      end.
              
      
  module_index(Conf, Index) ->
  
      log("Creating index.html ...~n"),
      
      Html = "<h1>Module Index</h1><hr /><br /><div>"
          ++ xml_to_str([ mod(X) || X = ["mod"|_] <- lists:sort(Index)])
          ++ "</div>",
      
      Args = [{base,    "./"},
              {title,   "Module Index - " ++ kf(name, Conf)},
              {content, Html},
  
negative.code: 
  %% Strips xml children that are entirely whitespace (space, tabs, newlines)
  strip_whitespace(List) when is_list(List) ->
      [ strip_whitespace(X) || X <- List, is_whitespace(X) ];
  strip_whitespace({El,Attr,Children}) ->
      {El, Attr, strip_whitespace(Children)};
  strip_whitespace(Else) ->
  