Skip to content

Commit

Permalink
""
Browse files Browse the repository at this point in the history
git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@44 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information
Claes Wikstrom committed Mar 24, 2002
1 parent d348051 commit 39c94ab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/yaws_compile.erl
Expand Up @@ -61,15 +61,20 @@ compile_file(C, LineNo, eof, Mode, NumChars, Ack) ->
{ok, lists:reverse([{data, NumChars} |Ack])};


%% skip initial space
%% skip initial space if first thing is <erl> otherwise not
compile_file(C, LineNo, Chars, init, NumChars, Ack) ->
case Chars -- [$\s, $\t, $\n, $\r] of
[] ->
?Debug("SKIP ~p~n", [Chars]),
L=length(Chars),
compile_file(C, LineNo+1, line(C), init, NumChars-L, Ack);
"<erl>" ++ _ -> %% first chunk is erl, skip whistespace
compile_file(C, LineNo, Chars, html, NumChars, Ack);
_ ->
compile_file(C, LineNo, Chars, html, NumChars, Ack)
%% first chunk is html, keep whitespace
Fd=C#comp.infd,
file:position(Fd, bof),
compile_file(C,1,io:get_line(Fd,''),html,0,[])
end;

compile_file(C, LineNo, Chars = "<erl>" ++ Tail, html, NumChars, Ack) ->
Expand Down

0 comments on commit 39c94ab

Please sign in to comment.