anchor.diff:  				      class = "msgval"}]}.
   
   %% @spec trim_whitespace(Input::string()) -> Result
  +%%   Result = string()
  +%% @doc Trims whitespace at start and end of a string.
  +trim_whitespace(Input) ->
  +    {_Leading, Txt, _Trailing} = split_whitespace(Input),
  +    Txt.
  +
  +%% @spec split_whitespace(Input::string()) -> Result
   %%   Result = {Leading, Text, Trailing}
   %%   Leading, Text, Trailing = string()
   %% @doc Trims whitespace at start and end of a string.
  -trim_whitespace(Input) ->
  +split_whitespace(Input) ->
      {match, [_, Leading, Text, Trailing]} = 
       re:run(Input, "^([\\s]*)(.*?)([\\s]*)$", [{capture, all, list}, dotall]),
      {Leading, Text, Trailing}.
  
positive.code: m([H|T])  -> [H|m(T)];
  m([])     -> [].
  
  build_row(Key, Val)->
      #tablerow { cells = [#tablecell { text = m(Key),
  				     class = "msgid",
  				     html_encode = false },
  
negative.code: %% from the key
  restore_whitespace(Orig, Trimmed) ->
      {Leading, _, Trailing} = 
  	split_whitespace(Orig),
      lists:append(Leading, lists:append(Trimmed, Trailing)).    
  
  restore_whitespace_test() ->
  