anchor.diff:      [{F,A,S,get_local_doc(F, D),M} || {F,A,S,D,M} <- FnFunctions].
   
   -spec render_callback(Module :: module(), Docs :: docs_v1()) -> unicode:chardata().
  -render_callback(Module, #docs_v1{ docs = Docs } = D) ->
  -    render_signature_listing(
  -      Module,
  -      "These callbacks are documented in this module:",
  -      lists:filter(fun({{callback, _, _},_Anno,_Sig,_Doc,_Meta}) ->
  -                           true;
  -                      (_) ->
  -                           false
  -                   end, Docs), D).
  +render_callback(Module, D) ->
  +    render_signature_listing(Module, callback, D).
   
   -spec render_callback(Module :: module(), Callback :: atom(), Docs :: docs_v1()) ->
             unicode:chardata() | {error,callback_missing}.
  
positive.code:     [{F,A,S,get_local_doc(F, D),M} || {F,A,S,D,M} <- FnFunctions].
  
  -spec render_type(Module :: module(), Docs :: docs_v1()) -> unicode:chardata().
  render_type(Module, #docs_v1{ docs = Docs } = D) ->
      render_signature_listing(
        Module,
        "These types are documented in this module:",
        lists:filter(fun({{type, _, _},_Anno,_Sig,_Doc,_Meta}) ->
                               true;
                          (_) ->
                               false
                       end, Docs), D).
  
  -spec render_type(Module :: module(), Type :: atom(), Docs :: docs_v1()) ->
            unicode:chardata() | {error,type_missing}.
  
negative.code:                                         Doc =/= #{}
                                  end, Members) of
                    {value, {_,_,_,Doc,_Meta}} ->
                        render_headers_and_docs(Signatures, get_local_doc({F,A},Doc), D);
                    false ->
                        case lists:keyfind(Group, 1, Docs) of
                            false ->
                                render_headers_and_docs(Signatures, get_local_doc({F,A},none), D);
                            {_,_,_,Doc,_} ->
                                render_headers_and_docs(Signatures, get_local_doc({F,A},Doc), D)
                        end
                end
        end, maps:to_list(Grouping)).
  
  %% Render the signature of either function, type, or anything else really.
  render_signature({{_Type,_F,_A},_Anno,_Sig,_Docs,#{ signature := Specs } = Meta}) ->
      lists:flatmap(
        fun(ASTSpec) ->
                Spec = unicode:characters_to_binary(
                         string:trim(
                           erl_pp:attribute(ASTSpec,[{encoding,utf8}]),
                           trailing, "\n")),
                [{pre,[],[{em,[],Spec}]}|render_meta(Meta)]
        end, Specs);
  render_signature({{_Type,_F,_A},_Anno,Sigs,_Docs,Meta}) ->
      lists:flatmap(
        fun(Sig) ->
                [{h2,[],[<<"  "/utf8,Sig/binary>>]}|render_meta(Meta)]
        end, Sigs).
  
  render_meta(M) ->
      case render_meta_(M) of
          [] -> [];
          Meta ->
              [[{dl,[],Meta}]]
      end.
  render_meta_(#{ since := Vsn } = M) ->
      [{dt,[],<<"Since">>},{dd,[],[Vsn]}
      | render_meta_(maps:remove(since, M))];
  render_meta_(#{ deprecated := Depr } = M) ->
      [{dt,[],<<"Deprecated">>},{dd,[],[Depr]}
      | render_meta_(maps:remove(deprecated, M))];
  render_meta_(_) ->
      [].
  
  render_headers_and_docs(Headers, DocContents, D) ->
      ["\n",render_docs(
         lists:flatmap(
           fun(Header) ->
                   [{br,[],[]},Header]
           end,Headers), 0, D),
       "\n",
       render_docs(DocContents,2,D)].
  
  %%% Functions for rendering type/callback documentation
  render_signature_listing(Module, Type, #docs_v1{ docs = Docs } = D) ->
      Slogan = [{h2,[],[<<"\t",(atom_to_binary(Module))/binary>>]},{br,[],[]}],
      case lists:filter(fun({{T, _, _},_Anno,_Sig,_Doc,_Meta}) ->
                                Type =:= T
                        end, Docs) of
          [] ->
              render_docs(
                Slogan ++ [<<"There are no ",(atom_to_binary(Type))/binary,"s "
                             "in this module">>], D);
          Headers ->
              Hdr = lists:flatmap(
                      fun(Header) ->
                              [{br,[],[]},render_signature(Header)]
                      end,Headers),
              render_docs(
                Slogan ++
                    [{p,[],[<<"These ",(atom_to_binary(Type))/binary,"s "
                              "are documented in this module:">>]},
                     {br,[],[]}, Hdr], D)
      end.
  
  render_typecb_docs([], _D) ->
      {error,type_missing};
  render_typecb_docs(TypeCBs, #config{} = D) when is_list(TypeCBs) ->
      [render_typecb_docs(TypeCB, D) || TypeCB <- TypeCBs];
  render_typecb_docs({{_,F,A},_,_Sig,Docs,_Meta} = TypeCB, #config{} = D) ->
      render_headers_and_docs(render_signature(TypeCB), get_local_doc({F,A},Docs), D);
  render_typecb_docs(Docs, D) ->
      render_typecb_docs(Docs, #config{ docs = D }).
  
  %%% General rendering functions
  render_docs(DocContents, D) ->
      render_docs(DocContents, 0, D).
  render_docs(DocContents, Ind, D = #config{}) ->
      init_ansi(D),
      try
          {Doc,_} = trimnl(render_docs(DocContents, [], 0, Ind, D)),
          Doc
      after
          clean_ansi()
      end;
  render_docs(DocContents, Ind, D) ->
      render_docs(DocContents, Ind, #config{ docs = D }).
  
  render_docs(Elems,State,Pos,Ind,D) when is_list(Elems) ->
      lists:mapfoldl(fun(Elem,P) ->
  %                           io:format("Elem: ~p (~p) (~p,~p)~n",[Elem,State,P,Ind]),
  