anchor.diff:                        [{start_tag, T1, A1, false} | Acc])
       end;
   to_tokens([{Tag0, [L | R1]} | Rest], Acc) when is_list(L) ->
  +    %% List text
       Tag = to_tag(Tag0),
       to_tokens([{Tag, R1} | Rest], [{data, L, false} | Acc]);
   to_tokens([{Tag0, [B | R1]} | Rest], Acc) when is_binary(B) ->
  +    %% Binary text
       Tag = to_tag(Tag0),
       to_tokens([{Tag, R1} | Rest], [{data, binary_to_list(B), false} | Acc]).
   
  
positive.code:         end).
  
  -define(IS_WHITESPACE(C),
  	(C =:= $\s orelse C =:= $\t orelse C =:= $\r orelse C =:= $\n)).
                                  
  -record(decoder, {line=1,
  		  column=1}).
  
  %% @type html_node() = {string(), [html_attr()], [html_node() | string()]}
  %% @type html_attr() = {string(), string()}
  %% @type html_token() = html_data() | start_tag() | end_tag()
  %% @type html_data() = {data, string(), Whitespace::boolean()}
  %% @type start_tag() = {start_tag, Name, [html_attr()], Singleton::boolean()}
  %% @type end_tag() = {end_tag, Name}
  
  %% External API.
  
  
negative.code: 
  %% @spec to_tokens(html_node()) -> [html_token()]
  %% @doc Convert a html_node() tree to a list of tokens.
  to_tokens({Tag0}) ->
      to_tokens({Tag0, [], []});
  to_tokens(T={'=', _}) ->
      [T];
  to_tokens(T={doctype, _}) ->
      [T];
  to_tokens(T={comment, _}) ->
      [T];
  to_tokens({Tag0, Acc}) ->
      to_tokens({Tag0, [], Acc});
  to_tokens({Tag0, Attrs, Acc}) ->
      Tag = to_tag(Tag0),
      to_tokens([{Tag, Acc}], [{start_tag, Tag, Attrs, is_singleton(Tag)}]).
  
  %% @spec to_html([html_token()] | html_node()) -> iolist()
  %% @doc Convert a list of html_token() to a HTML document.
  to_html(Node) when is_tuple(Node) ->
      to_html(to_tokens(Node));
  to_html(Tokens) when is_list(Tokens) ->
      to_html(Tokens, []).
  