Skip to content

Commit

Permalink
Adjust whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
aantron committed Dec 25, 2017
1 parent 0479c16 commit d2905e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/encoding.ml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ let ebcdic_37_table = [|

let ebcdic : t = code_page ebcdic_37_table

let iso_8859_15_table= [|
let iso_8859_15_table = [|
(* ASCII *)
0x0000; 0x0001; 0x0002; 0x0003; 0x0004; 0x0005; 0x0006; 0x0007;
0x0008; 0x0009; 0x000A; 0x000B; 0x000C; 0x000D; 0x000E; 0x000F;
Expand Down
4 changes: 3 additions & 1 deletion test/test_detect.ml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ let tests = [
(Some "shift_jis");
check "<meta http-equiv='content-type' content='charset=shift_jis foo'>"
(Some "shift_jis");
check "<meta http-equiv='content-type' content='text/html' charset='iso-8859-15'>"
check
("<meta http-equiv='content-type' content='text/html' " ^
"charset='iso-8859-15'>")
(Some "iso-8859-15");
check "<meta http-equiv='content-type' content='charset=\"\"'>" None;
check "<meta>" None;
Expand Down
8 changes: 6 additions & 2 deletions test/test_integration.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ let tests = [
"<p><em>bar</em></p></body></html>"));

("integration.html.encoding" >:: fun _ ->
"<!DOCTYPE html><html><head><meta http-equiv='content-type' content='text/html' charset='iso-8859-15'></head><body><p><em>\xA0\xA4foo<p>bar"
("<!DOCTYPE html><html><head><meta http-equiv='content-type' " ^
"content='text/html' charset='iso-8859-15'></head>" ^
"<body><p><em>\xA0\xA4foo<p>bar")
|> string
|> parse_html
|> signals
|> write_html
|> to_string
|> assert_equal
("<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html\" charset=\"iso-8859-15\"></head><body><p><em>&nbsp;\xE2\x82\xACfoo</em></p>" ^
("<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" " ^
"content=\"text/html\" charset=\"iso-8859-15\"></head>" ^
"<body><p><em>&nbsp;\xE2\x82\xACfoo</em></p>" ^
"<p><em>bar</em></p></body></html>"));

("integration.html.context-disambiguation" >:: fun _ ->
Expand Down

0 comments on commit d2905e3

Please sign in to comment.