anchor.diff:      escape_attr(Rest, [C | Acc]).
   
   to_tag(A) when is_atom(A) ->
  -    atom_to_list(A);
  +    norm(atom_to_list(A));
   to_tag(L) ->
  -    L.
  +    norm(L).
   
   to_tokens([], Acc) ->
       lists:reverse(Acc);
  
positive.code:     {Tag, Rest1, S1} = tokenize_literal(Rest, ?INC_COL(S), []),
      {Attrs, Rest2, S2} = tokenize_attributes(Rest1, S1, []),
      {Rest3, S3, HasSlash} = find_gt(Rest2, S2, false),
      Singleton = HasSlash orelse is_singleton(string:to_lower(Tag)),
      {{start_tag, Tag, Attrs, Singleton}, Rest3, S3};
  tokenize(Rest, S) ->
      tokenize_data(Rest, S, [], true).
  
  test_parse() ->
      D0 = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
  <html>
   <head>
     <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">
  
negative.code:     tokenize_literal(Rest, S, []).
      
  tokenize_word([], S, _Quote, Acc) ->
      {list_to_binary(lists:reverse(Acc)), [], S};
  tokenize_word([Quote | Rest], S, Quote, Acc) ->
      {list_to_binary(lists:reverse(Acc)), Rest, ?INC_COL(S)};
  tokenize_word([$& | Rest], S, Quote, Acc) ->
      {{data, Data, false}, S1, Rest1} = tokenize_charref(Rest, ?INC_COL(S), []),
      tokenize_word(Rest1, S1, Quote, lists:reverse(binary_to_list(Data), Acc));
  tokenize_word([C | Rest], S, Quote, Acc) ->
      tokenize_word(Rest, ?INC_CHAR(S, C), Quote, [C | Acc]).
  
  tokenize_literal([], S, Acc) ->
      {list_to_binary(lists:reverse(Acc)), [], S};
  tokenize_literal(Rest=">" ++ _, S, Acc) ->
      {list_to_binary(lists:reverse(Acc)), Rest, S};
  tokenize_literal([$& | Rest], S, Acc) ->
      {{data, Data, false}, S1, Rest1} = tokenize_charref(Rest, ?INC_COL(S), []),
      tokenize_literal(Rest1, S1, lists:reverse(binary_to_list(Data), Acc));
  tokenize_literal(Rest=[C | _], S, Acc) when ?IS_WHITESPACE(C)
                                              orelse C =:= $/
                                              orelse C =:= $= ->
      {list_to_binary(lists:reverse(Acc)), Rest, S};
  tokenize_literal([C | Rest], S, Acc) ->
      tokenize_literal(Rest, ?INC_COL(S), [C | Acc]).
  
  tokenize_cdata([], S, Acc) ->
      {{data, list_to_binary(lists:reverse(Acc)), false}, [], S};
  tokenize_cdata("]]>" ++ Rest, S, Acc) ->
      {{data, list_to_binary(lists:reverse(Acc)), false}, Rest, ?ADV_COL(S, 3)};
  tokenize_cdata([C | Rest], S, Acc) ->
      tokenize_cdata(Rest, ?INC_CHAR(S, C), [C | Acc]).
  
  tokenize_comment([], S, Acc) ->
      {{comment, list_to_binary(lists:reverse(Acc))}, [], S};
  tokenize_comment("-->" ++ Rest, S, Acc) ->
      {{comment, list_to_binary(lists:reverse(Acc))}, Rest, ?ADV_COL(S, 3)};
  tokenize_comment([C | Rest], S, Acc) ->
      tokenize_comment(Rest, ?INC_CHAR(S, C), [C | Acc]).
  