Skip to content

Commit

Permalink
fix a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 30, 2015
1 parent 2ebe067 commit db359fc
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
11 changes: 6 additions & 5 deletions Changes
@@ -1,5 +1,6 @@

6.28 2015-10-30
- Fixed multi-line attribute bug in Mojo::DOM::HTML. (jamadam)

6.27 2015-10-29
- Updated HTML5 entities in Mojo::Util.
Expand Down Expand Up @@ -1453,9 +1454,9 @@
- Added direct array access for parsed parameters to Mojo::Parameters.
- Added direct array access for path parts to Mojo::Path.
- Improved dumper helper to sort hash keys.
- Fixed bug in Mojo::Headers that prevented multiline headers from being
- Fixed bug in Mojo::Headers that prevented multi-line headers from being
parsed correctly.
- Fixed multiline header support in hash representation of Mojo::Headers.
- Fixed multi-line header support in hash representation of Mojo::Headers.
- Fixed cloning bug in Mojo::Headers.

3.89 2013-03-04
Expand Down Expand Up @@ -3395,7 +3396,7 @@
- Improved nested exception handling. (spleenjack)
- Fixed relative path handling.
- Fixed application generator. (yko)
- Fixed support for multiline expressions in Mojo::Template.
- Fixed support for multi-line expressions in Mojo::Template.
- Fixed multiple --reload related leaks and reduced overall memory usage.
- Fixed exception handling for included templates.
- Fixed a small Mojo::Server::PSGI header bug.
Expand Down Expand Up @@ -3625,7 +3626,7 @@
- Fixed Mojo::DOM to support escaped selectors.
- Fixed Mojo::DOM parser bugs.
- Fixed Mojo::DOM child listing bug. (evt)
- Fixed Mojo::DOM multiline attribute bug. (tempire)
- Fixed Mojo::DOM multi-line attribute bug. (tempire)
- Fixed charset detection of the dom builder in Mojo::Message. (und3f)
- Fixed json/data rendering with layouts in MojoX::Renderer.
- Fixed Mojo::IOLoop to not stop unexpectedly.
Expand Down Expand Up @@ -4225,7 +4226,7 @@

0.991234 2009-07-03
- Added name and value filters to Mojo::Headers. (acajou)
- Added clean multiline value handling to Mojo::Headers.
- Added clean multi-line value handling to Mojo::Headers.
- Added prepare/finalize methods to Mojolicious.
- Added some additional MIME types to MojoX::Types.
- Renamed method add_line to add in Mojo::Headers.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/DOM/HTML.pm
Expand Up @@ -8,7 +8,7 @@ has tree => sub { ['root'] };
has 'xml';

my $ATTR_RE = qr/
([^<>=\s\/]+|\/) # Key
([^<>=\s\/]+|\/) # Key
(?:
\s*=\s*
(?s:(["'])(.*?)\g{-2}|([^>\s]*)) # Value
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Headers.pm
Expand Up @@ -101,7 +101,7 @@ sub parse {
# New header
if ($line =~ /^(\S[^:]*)\s*:\s*(.*)$/) { push @$headers, [$1, $2] }

# Multiline
# Multi-line
elsif ($line =~ s/^\s+// && @$headers) { $headers->[-1][1] .= " $line" }

# Empty line
Expand Down Expand Up @@ -135,7 +135,7 @@ sub to_hash {
sub to_string {
my $self = shift;

# Make sure multiline values are formatted correctly
# Make sure multi-line values are formatted correctly
my @headers;
for my $name (@{$self->names}) {
push @headers, "$name: $_" for @{$self->{headers}{lc $name}};
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -43,7 +43,7 @@ sub build {
$blocks[-1] .= "\$_O .= \"" . $value . "\";" if $value ne '';
}

# Code or multiline expression
# Code or multi-line expression
elsif ($op eq 'code' || $multi) { $blocks[-1] .= $value }

# Capture end
Expand All @@ -65,7 +65,7 @@ sub build {
# Raw
elsif (!$multi) { $blocks[-1] .= "\$_O .= scalar + $value" }

# Multiline
# Multi-line
$multi = !$next || $next->[0] ne 'text';

# Append semicolon
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Util.pm
Expand Up @@ -752,7 +752,7 @@ Trim whitespace characters from both ends of string.
my $unindented = unindent $str;
Unindent multiline string.
Unindent multi-line string.
# "foo\nbar\nbaz\n"
unindent " foo\n bar\n baz\n";
Expand Down
4 changes: 2 additions & 2 deletions t/mojo/dom.t
Expand Up @@ -773,9 +773,9 @@ is $dom->at('[test=""]')->tag, 'div', 'right tag';
is $dom->at('[test2=""]')->tag, 'div', 'right tag';
is $dom->at('[test3=""]'), undef, 'no result';

# Multi line in attribute
# Multi-line attribute
$dom = Mojo::DOM->new(qq{<div test="line1\nline2" />});
is $dom->at('div')->attr->{test}, "line1\nline2", 'multi line attribute';
is $dom->at('div')->attr->{test}, "line1\nline2", 'multi-line attribute';

# Whitespaces before closing bracket
$dom = Mojo::DOM->new('<div >content</div>');
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/headers.t
Expand Up @@ -141,7 +141,7 @@ is $headers->cache_control, 'public', 'right value';
is $headers->expires, 'Thu, 01 Dec 1994 16:00:00 GMT', 'right value';
is $headers->header('o'), 'x', 'right value';

# Parse multiline headers
# Parse multi-line headers
$headers = Mojo::Headers->new;
$headers->parse(<<'EOF');
Foo: first
Expand Down

0 comments on commit db359fc

Please sign in to comment.