anchor.diff:          <<_:Start/binary, Raw/binary>> ->
               {{comment, Raw}, S}
       end.
  +
  +tokenize_script(Bin, S=#decoder{offset=O}) ->
  +    tokenize_script(Bin, S, O).
  +
  +tokenize_script(Bin, S=#decoder{offset=O}, Start) ->
  +    case Bin of
  +        %% Just a look-ahead, we want the end_tag separately
  +        <<_:O/binary, $<, $/, SS, CC, RR, II, PP, TT, _/binary>>
  +        when (SS =:= $s orelse SS =:= $S) andalso
  +             (CC =:= $c orelse CC =:= $C) andalso
  +             (RR =:= $r orelse RR =:= $R) andalso
  +             (II =:= $i orelse II =:= $I) andalso
  +             (PP =:= $p orelse PP =:= $P) andalso
  +             (TT=:= $t orelse TT =:= $T) ->
  +            Len = O - Start,
  +            <<_:Start/binary, Raw:Len/binary, _/binary>> = Bin,
  +            {{data, Raw, false}, S};
  +        <<_:O/binary, C, _/binary>> ->
  +            tokenize_script(Bin, ?INC_CHAR(S, C), Start);
  +        <<_:Start/binary, Raw/binary>> ->
  +            {{data, Raw, false}, S}
  +    end.
  +
  +tokenize_textarea(Bin, S=#decoder{offset=O}) ->
  +    tokenize_textarea(Bin, S, O).
  +
  +tokenize_textarea(Bin, S=#decoder{offset=O}, Start) ->
  +    case Bin of
  +        %% Just a look-ahead, we want the end_tag separately
  +        <<_:O/binary, $<, $/, TT, EE, XX, TT, AA, RR, EE, AA, _/binary>>
  +        when (TT =:= $t orelse TT =:= $T) andalso
  +             (EE =:= $e orelse EE =:= $E) andalso
  +             (XX =:= $x orelse XX =:= $X) andalso
  +             (AA =:= $a orelse AA =:= $A) andalso
  +             (RR =:= $r orelse RR =:= $R) ->
  +            Len = O - Start,
  +            <<_:Start/binary, Raw:Len/binary, _/binary>> = Bin,
  +            {{data, Raw, false}, S};
  +        <<_:O/binary, C, _/binary>> ->
  +            tokenize_textarea(Bin, ?INC_CHAR(S, C), Start);
  +        <<_:Start/binary, Raw/binary>> ->
  +            {{data, Raw, false}, S}
  +    end.
  
positive.code: -define(IS_LITERAL_SAFE(C),
          ((C >= $A andalso C =< $Z) orelse (C >= $a andalso C =< $z)
           orelse (C >= $0 andalso C =< $9))).
                                  
  -record(decoder, {line=1,
                    column=1,
                    offset=0}).
  
negative.code:         tokens(<<"<foo bar=baz wibble='wibble' alice=bob/>">>),
      [{comment, <<"[if lt IE 7]>\n<style type=\"text/css\">\n.no_ie { display: none; }\n</style>\n<![endif]">>}] =
          tokens(<<"<!--[if lt IE 7]>\n<style type=\"text/css\">\n.no_ie { display: none; }\n</style>\n<![endif]-->">>),
      [{start_tag, <<"script">>, [{<<"type">>, <<"text/javascript">>}], false},
       {data, <<" A= B <= C ">>, false},
       {end_tag, <<"script">>}] =
          tokens(<<"<script type=\"text/javascript\"> A= B <= C </script>">>),
      [{start_tag, <<"textarea">>, [], false},
       {data, <<"<html></body>">>, false},
       {end_tag, <<"textarea">>}] =
          tokens(<<"<textarea><html></body></textarea>">>),
      ok.
  
  tokens(B, S=#decoder{offset=O}, Acc) ->
  