anchor.diff:                ([A,B,C,D]) ->
                     fmt("['~s','~s','~s','~s']", [html_encode(X) || X <- [A,B,C,D]])
             end,
  -          lists:sort(fun sort_index/2, lists:map(F, FIndex))),
  +          Sorted),
   
       Js = fmt("var index = [~s];",
                [string:join([[C || C <- I, C /= $\n, C /= $\r] || I <- Index], ",")]),
   
       ok = file:write_file(jname(kf(dest,Conf), "erldocs_index.js"), Js).
  +
  +shorten (Str) ->
  +    string:substr(Str, 1, 50).
   
   %% Note: handles both erlref and cref types
   render (App, Mod, Xml, Types, Conf) ->
  
positive.code:     ?log("Creating index.html ..."),
  
      Html = "<h1>Module Index</h1><hr/><br><div>"
          ++      xml_to_html(emit_index(Index))
          ++ "</div>",
      Args = [ {base,    kf(base,Conf)}
             , {search_base, "./"}
  
negative.code:     ?log("Creating erldocs_index.js ..."),
  
      F = fun ([Else, App, NMod, Sum]) ->
                  [Else, App, NMod, fmt("~ts", [shorten(Sum)])]
          end,
  
      Sorted = lists:sort(fun sort_index/2, lists:map(F, FIndex)),
      Index =
          lists:map(
            fun ([A,B,C,[]]) ->
  