Permalink
Browse files

io_lib:format/2 does not return a flat string, lists:concat produces …

…a more pretty-printable result.
  • Loading branch information...
1 parent 251acc6 commit acff6d295fb83c78b1cb70d1750c66bab904aaf5 @noss noss committed Dec 31, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/erlydtl/erlydtl_scanner.erl
View
6 src/erlydtl/erlydtl_scanner.erl
@@ -197,15 +197,15 @@ scan([H | T], Scanned, {Row, Column}, {in_code, Closer}) ->
digit ->
scan(T, [{number_literal, {Row, Column}, [H]} | Scanned], {Row, Column + 1}, {in_number, Closer});
_ ->
- {error, io_lib:format("Illegal character line ~p column ~p", [Row, Column])}
+ {error, lists:concat(["Illegal character line ", Row, " column ", Column])}
end;
scan([H | T], Scanned, {Row, Column}, {in_number, Closer}) ->
case char_type(H) of
digit ->
scan(T, append_char(Scanned, H), {Row, Column + 1}, {in_number, Closer});
_ ->
- {error, io_lib:format("Illegal character line ~p column ~p", [Row, Column])}
+ {error, lists:concat(["Illegal character line ", Row, " column ", Column])}
end;
scan([H | T], Scanned, {Row, Column}, {in_identifier, Closer}) ->
@@ -215,7 +215,7 @@ scan([H | T], Scanned, {Row, Column}, {in_identifier, Closer}) ->
digit ->
scan(T, append_char(Scanned, H), {Row, Column + 1}, {in_identifier, Closer});
_ ->
- {error, io_lib:format("Illegal character line ~p column ~p", [Row, Column])}
+ {error, lists:concat(["Illegal character line ", Row, " column ", Column])}
end.
% internal functions

0 comments on commit acff6d2

Please sign in to comment.