Skip to content

Commit

Permalink
small documentation and template tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 24, 2012
1 parent be0ef1d commit c00414c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
12 changes: 6 additions & 6 deletions lib/Mojo/DOM.pm
Expand Up @@ -669,9 +669,9 @@ this method is EXPERIMENTAL and might change without warning!
my $trimmed = $dom->text_after;
my $untrimmed = $dom->text_after(0);
Extract text content immediately after element, smart whitespace trimming is
activated by default. Note that this method is EXPERIMENTAL and might change
without warning!
Extract text content immediately following element, smart whitespace trimming
is activated by default. Note that this method is EXPERIMENTAL and might
change without warning!
# "baz"
$dom->parse("<div>foo\n<p>bar</p>baz\n</div>")->div->p->text_after;
Expand All @@ -684,9 +684,9 @@ without warning!
my $trimmed = $dom->text_before;
my $untrimmed = $dom->text_before(0);
Extract text content immediately before element, smart whitespace trimming is
activated by default. Note that this method is EXPERIMENTAL and might change
without warning!
Extract text content immediately preceding element, smart whitespace trimming
is activated by default. Note that this method is EXPERIMENTAL and might
change without warning!
# "foo"
$dom->parse("<div>foo\n<p>bar</p>baz\n</div>")->div->p->text_before;
Expand Down
23 changes: 11 additions & 12 deletions lib/Mojolicious/templates/exception.development.html.ep
Expand Up @@ -119,29 +119,28 @@
</tr>
% end
<div id="showcase" class="code box">
% my $e = $self->stash->{exception};
<pre><%= $e->message %></pre>
<pre><%= $exception->message %></pre>
<div id="context">
<table>
% for my $line (@{$e->lines_before}) {
% for my $line (@{$exception->lines_before}) {
%= $cv->($line->[0], $line->[1])
% }
% if (defined $e->line->[1]) {
%= $cv->($e->line->[0], $e->line->[1], 1)
% if (defined $exception->line->[1]) {
%= $cv->($exception->line->[0], $exception->line->[1], 1)
% }
% for my $line (@{$e->lines_after}) {
% for my $line (@{$exception->lines_after}) {
%= $cv->($line->[0], $line->[1])
% }
</table>
</div>
% if (defined $e->line->[2]) {
% if (defined $exception->line->[2]) {
<div id="insight">
<table>
% for my $line (@{$e->lines_before}) {
% for my $line (@{$exception->lines_before}) {
%= $cv->($line->[0], $line->[2])
% }
%= $cv->($e->line->[0], $e->line->[2], 1)
% for my $line (@{$e->lines_after}) {
%= $cv->($exception->line->[0], $exception->line->[2], 1)
% for my $line (@{$exception->lines_after}) {
%= $cv->($line->[0], $line->[2])
% }
</table>
Expand All @@ -165,10 +164,10 @@
% }
</div>
<div class="box" id="trace">
% if (@{$e->frames}) {
% if (@{$exception->frames}) {
<div class="infobox" id="frames">
<table>
% for my $frame (@{$e->frames}) {
% for my $frame (@{$exception->frames}) {
<tr>
<td class="striped value">
<pre><%= $frame->[1] . ':' . $frame->[2] %></pre>
Expand Down

0 comments on commit c00414c

Please sign in to comment.