Skip to content
Browse files

*** empty log message ***

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@554 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent ad76324 commit 00d985a94c476d54f5785be403017889e9587be8 Johan Bevemyr committed Dec 3, 2003
Showing with 13 additions and 4 deletions.
  1. +13 −4 src/yaws_html.erl
View
17 src/yaws_html.erl
@@ -51,10 +51,16 @@ parse([{end_tag,T,[],L}|Tokens], {T,A,_}, [{CTag,CAcc}|Stack], Acc) ->
end,
parse(Tokens, CTag, Stack, [E|CAcc]);
-parse([{end_tag,T1,[],L1}|Tokens], {T2,A,L2}, Stack, Acc) ->
- Msg = lists:flatten(io_lib:format("expected '</~p>' on line ~p, start "
- "tag at line: ~p", [T2,L1,L2])),
- {error, Msg};
+parse([{end_tag,T1,[],L1}|Tokens], CTag = {T2,A,L2}, Stack, Acc) ->
+ case tag_type(T) of
+ leaf -> % ignore
+ parse(Tokens, CTag, Stack, Acc);
+ node ->
+ Msg = lists:flatten(io_lib:format(
+ "expected '</~p>' on line ~p, start "
+ "tag at line: ~p", [T2,L1,L2])),
+ {error, Msg}
+ end;
parse([{data, Data, Line}|Tokens], CTag, Stack, Acc) ->
case skip_space(Data, 0) of
@@ -65,6 +71,9 @@ parse([{data, Data, Line}|Tokens], CTag, Stack, Acc) ->
end.
%
+tag_type(p) -> leaf;
+tag_type(hr) -> leaf;
+tag_type(input) -> leaf;
tag_type(base) -> leaf;
tag_type(img) -> leaf;
tag_type('!doctype') -> leaf;

0 comments on commit 00d985a

Please sign in to comment.
Something went wrong with that request. Please try again.