anchor.diff:                          catch bogus -> State
                           end;
       {comment,Cm}     -> emit({comment,Cm},State);
  -    {question,DT}    -> emit({question,DT},State);
  -    {exclamation,DT} -> emit({exclamation,DT},State);
  -    {text,""}        -> State;
  +    {'?',DT}    -> emit({'?',DT},State);
  +    {'!',DT} -> emit({'!',DT},State);
  +    {text,<<>>}        -> State;
       {text,Text}      -> emit({text,Text},State)
     end.
   
  
positive.code: ff(text)  -> "(.*)<(.*)\$".
  
  ff(Str,P,Groups) ->
    case re:run(Str,P,[{capture,Groups,list},dotall,caseless,ungreedy]) of
      {match,Ms} -> Ms;
      nomatch -> []
    end.
  
  ws([X|Str]) when ?ws(X) -> ws(Str);
  ws(Str) -> Str.
  
  dc(Str) -> string:to_lower(Str).
  
negative.code: 
  tests() ->
    [{"<!DOCTYPE bla><P a=b c=d>",
      [{'!',"doctype bla"},
       {tag,"p",[{"a","b"},{"c","d"}]},
       {end_tag,"p"}]},
     {"<head><B>< p><p ></z></ b></x>",
  