Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
no need to parse whitespace twice
  • Loading branch information
kraih committed Dec 6, 2014
1 parent 20475e7 commit 643865a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,7 +1,8 @@

5.69 2014-12-05
5.69 2014-12-06
- Removed deprecated emit_safe method from Mojo::EventEmitter.
- Removed deprecated render_static method from Mojolicious::Controller.
- Improved Mojo::DOM::HTML performance slightly.
- Fixed parent combinator bug in Mojo::DOM::CSS.

5.68 2014-12-02
Expand Down
5 changes: 2 additions & 3 deletions lib/Mojo/DOM/HTML.pm
Expand Up @@ -39,8 +39,7 @@ my $TOKEN_RE = qr/
|
\?(.*?)\? # Processing Instruction
|
(\s*[^<>\s]+ # Tag
\s*(?:(?:$ATTR_RE){0,32766})*+) # Attributes
\s*([^<>\s]+\s*(?:(?:$ATTR_RE){0,32766})*+) # Tag
)>
|
(<) # Runaway "<"
Expand Down Expand Up @@ -118,7 +117,7 @@ sub parse {
if (defined $tag) {

# End
if ($tag =~ /^\s*\/\s*(.+)/) { _end($xml ? $1 : lc $1, $xml, \$current) }
if ($tag =~ /^\/\s*(.+)/) { _end($xml ? $1 : lc $1, $xml, \$current) }

# Start
elsif ($tag =~ m!([^\s/]+)([\s\S]*)!) {
Expand Down

0 comments on commit 643865a

Please sign in to comment.