Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
added 5px margin-top to IsValid <pre>
Browse files Browse the repository at this point in the history
  • Loading branch information
majuscule committed Aug 8, 2012
1 parent 227a9ff commit 670bd33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/DDG/Goodie/IsValid/JSON.pm
Expand Up @@ -29,7 +29,8 @@ handle remainder => sub {
my $answer_html = $answer;

$answer .= $error if $error;
$answer_html .= "<pre style=\"font-size:12px\">$error</pre>" if $error;
$answer_html .= "<pre style=\"font-size:12px;"
. "margin-top:5px;\">$error</pre>" if $error;

return $answer, html => $answer_html
};
Expand Down
3 changes: 2 additions & 1 deletion lib/DDG/Goodie/IsValid/XML.pm
Expand Up @@ -30,7 +30,8 @@ handle remainder => sub {
my $answer_html = $answer;

$answer .= $error if $error;
$answer_html .= "<pre style=\"font-size:12px\">$error</pre>" if $error;
$answer_html .= "<pre style=\"font-size:12px;"
. "margin-top:5px;\">$error</pre>" if $error;

return $answer, html => $answer_html
};
Expand Down
4 changes: 2 additions & 2 deletions t/IsValid.t
Expand Up @@ -21,7 +21,7 @@ ddg_goodie_test(
[qw(DDG::Goodie::IsValid::JSON)],
'is valid json {"test" "lol"}' => test_zci(
'Your JSON is invalid: \':\' expected, at character offset 8 (before ""lol"}")',
html => 'Your JSON is invalid: <pre style="font-size:12px">\':\' expected, at character offset 8 (before ""lol"}")</pre>'
html => 'Your JSON is invalid: <pre style="font-size:12px;margin-top:5px;">\':\' expected, at character offset 8 (before ""lol"}")</pre>'
)
);

Expand All @@ -37,7 +37,7 @@ ddg_goodie_test(
[qw(DDG::Goodie::IsValid::XML)],
'is valid xml <test>lol' => test_zci(
'Your XML is invalid: no element found at line 1, column 9, byte 9',
html => 'Your XML is invalid: <pre style="font-size:12px">no element found at line 1, column 9, byte 9</pre>'
html => 'Your XML is invalid: <pre style="font-size:12px;margin-top:5px;">no element found at line 1, column 9, byte 9</pre>'
)
);

Expand Down

0 comments on commit 670bd33

Please sign in to comment.