diff options
author | Peter Andersson <[email protected]> | 2011-12-02 11:25:41 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-12-02 11:26:19 +0100 |
commit | 1224426eb9303c79d248b4d397a283c86861dee4 (patch) | |
tree | 216832459bfce1d494cc431136aea4fdebb09ced /lib/common_test/src/ct_logs.erl | |
parent | 50b488753358d38348f2d4051bfcea8d860e739b (diff) | |
parent | 53e920c49505e6835f8d69604e5bd2018edefe85 (diff) | |
download | otp-1224426eb9303c79d248b4d397a283c86861dee4.tar.gz otp-1224426eb9303c79d248b4d397a283c86861dee4.tar.bz2 otp-1224426eb9303c79d248b4d397a283c86861dee4.zip |
Merge remote branch 'origin/peppe/common_test/css_fixes'
* origin/peppe/common_test/css_fixes:
Bugfixes and improvements of the the CSS stylesheet implementation
OTP-9706
Diffstat (limited to 'lib/common_test/src/ct_logs.erl')
-rw-r--r-- | lib/common_test/src/ct_logs.erl | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index d66a31d9a5..19ad7b26d8 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -223,7 +223,6 @@ init_tc(RefreshLog) -> %%% %%% <p>This function is called by ct_framework:end_tc/3</p> end_tc(TCPid) -> - io:format(xhtml("<br>", "<br />")), %% use call here so that the TC process will wait and receive %% possible exit signals from ct_logs before end_tc returns ok call({end_tc,TCPid}). @@ -745,20 +744,19 @@ print_style(Fd,StyleSheet) -> 0 -> string:str(Str,"<STYLE>"); N0 -> N0 end, - case Pos0 of - 0 -> print_style_error(Fd,StyleSheet,missing_style_tag); - _ -> - Pos1 = case string:str(Str,"</style>") of - 0 -> string:str(Str,"</STYLE>"); - N1 -> N1 - end, - case Pos1 of - 0 -> - print_style_error(Fd,StyleSheet,missing_style_end_tag); - _ -> - Style = string:sub_string(Str,Pos0,Pos1+7), - io:format(Fd,"~s\n",[Style]) - end + Pos1 = case string:str(Str,"</style>") of + 0 -> string:str(Str,"</STYLE>"); + N1 -> N1 + end, + if (Pos0 == 0) and (Pos1 /= 0) -> + print_style_error(Fd,StyleSheet,missing_style_start_tag); + (Pos0 /= 0) and (Pos1 == 0) -> + print_style_error(Fd,StyleSheet,missing_style_end_tag); + Pos0 /= 0 -> + Style = string:sub_string(Str,Pos0,Pos1+7), + io:format(Fd,"~s\n",[Style]); + Pos0 == 0 -> + io:format(Fd,"<style>~s</style>\n",[Str]) end; {error,Reason} -> print_style_error(Fd,StyleSheet,Reason) |