anchor.diff:  	true  -> {preformatted, ehtml_var_name(A)};
   	false -> atom_to_list(A)
       end;
  -ehtml_attr_part_expander(I) when integer(I) ->
  -    integer_to_list(I);
  -ehtml_attr_part_expander(S) when list(S) ->
  -    S.
  -
  -ehtml_expander_done(X, Before, After) ->
  -    [reverse([X|Before]), After].
  +ehtml_attr_part_expander(I) when integer(I) -> integer_to_list(I);
  +ehtml_attr_part_expander(S) when list(S) -> S.
  +
  +ehtml_expander_done(X, Before, After) -> [reverse([X|Before]), After].
   
   %% Compress an EHTML expander, converting all adjacent bits of text into
   %% binaries.
  
positive.code: 			 ehtml_attrs_expander(Attrs),">"],
  			Before,
  			After);
  ehtml_expander({Tag, Attrs}, Before, After) ->
      ehtml_expander_done(["<",atom_to_list(Tag),
  			 ehtml_attrs_expander(Attrs),">"],
  			Before,
  			After);
  ehtml_expander({Tag, Attrs, Body}, Before, After) ->
      ehtml_expander(Body,
  		   [["<",atom_to_list(Tag), ehtml_attrs_expander(Attrs), ">"] |
  		    Before],
  		   ["</",atom_to_list(Tag),">" | After]);
  %% Variable references
  ehtml_expander(Var, Before, After) when atom(Var) ->
      [reverse(Before), {ehtml, ehtml_var_name(Var)}, After];
  %% Lists
  ehtml_expander([H|T], Before, After) ->
      ehtml_expander(T, [ehtml_expander(H, [], []) | Before], After);
  ehtml_expander([], Before, After) ->
      ehtml_expander_done("", Before, After).
  
  
  %% Expander for attributes. The attribute name and value can each be a
  %% variable reference.
  ehtml_attrs_expander([]) ->
      "";
  ehtml_attrs_expander([{Var,Val}|T]) ->
      [[" ",
        ehtml_attr_part_expander(Var),
        "=",
        "\"", ehtml_attr_part_expander(Val), "\""]
       | ehtml_attrs_expander(T)];
  ehtml_attrs_expander(Var) when atom(Var) ->
      %% Var in the cdr of an attribute list
      [{ehtml_attrs, ehtml_var_name(Var)}].
  
negative.code: %% Key 	 = atom()
  %% Value = string()
  %% Body  = EHTML
  ehtml_expand(Ch) when Ch >= 0, Ch =< 255 -> yaws_api:htmlize_char(Ch);
  ehtml_expand(Bin) when binary(Bin) -> yaws_api:htmlize(Bin);
  ehtml_expand({Tag}) -> ehtml_expand({Tag, []});
  ehtml_expand({pre_html, X}) -> X;
  ehtml_expand({pre, Attrs}) -> ["<pre", ehtml_attrs(Attrs), ">"];
  ehtml_expand({img, Attrs}) -> ["<img", ehtml_attrs(Attrs), ">"];
  ehtml_expand({Tag, Attrs}) ->
      ["<", atom_to_list(Tag), ehtml_attrs(Attrs), ">\n"];
  ehtml_expand({Tag, Attrs, Body}) when atom(Tag) ->
      Ts = atom_to_list(Tag),
      ["<", Ts, ehtml_attrs(Attrs), ">\n", ehtml_expand(Body), "</", Ts, ">\n"];
  ehtml_expand([H|T]) -> [ehtml_expand(H)|ehtml_expand(T)];
  ehtml_expand([]) -> [].
  
  ehtml_attrs([]) -> [];
  ehtml_attrs([Attribute|Tail]) when atom(Attribute) ->
      [[$ |atom_to_list(Attribute)]|ehtml_attrs(Tail)];
  ehtml_attrs([{Name, Value} | Tail]) ->
      ValueString = if atom(Value) -> [$",atom_to_list(Value),$"];
  		     list(Value) -> [$",Value,$"];
  		     integer(Value) -> [$",integer_to_list(Value),$"];
  		     float(Value) -> [$",float_to_list(Value),$"]
  		  end,
      [[$ |atom_to_list(Name)], [$=|ValueString]|ehtml_attrs(Tail)].
  
  %% ------------------------------------------------------------
  %% ehtml_expander/1: an EHTML optimizer
  