anchor.diff:  sort_index (A, B) ->
       index_ordering(A) =< index_ordering(B).
   
  -html_encode (Str) ->
  -    re:replace(Str, "'", "", [{return, list}, global]).
  +html_encode (Str)  ->
  +    [C || C <- Str, C /= $'].
   
   javascript_index (Conf, FIndex) ->
   
  
positive.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) ->
      Else.
  
  is_whitespace (X) when is_tuple(X); is_number(X) ->
      true;
  is_whitespace (X) ->
      nomatch == re:run(X, "^[ \n\t]*$", [unicode]). %"
  
  %% rather basic xml to string converter, takes xml of the form
  %% {tag, [{listof, "attributes"}], ["list of children"]}
  
negative.code:               end,
                lists:sort(fun sort_index/2, lists:map(F, FIndex))),
  
      Js = fmt("var index = [~s];",
               [string:join([[C || C <- I, C /= $\n, C /= $\r] || I <- Index], ",")]),
  
      ok = file:write_file([dest(Conf), "/erldocs_index.js"], Js).
  
  