Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fixes $.trim for closes #4980
- Loading branch information
Yehuda Katz
authored and
Yehuda Katz
committed
Nov 30, 2009
1 parent
84857ab
commit 17955ca
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17955ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the ^ is removed from the rtrim?
17955ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the caret breaks this because it kills whitespace in between characters.
r = /^\s+|\s+$/g
s = ' wh at'
s = s.replace( r, '' )
17955ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that omission of ^ has been reverted in this commit. http://github.com/jquery/jquery/commit/abbd2f4c3c93d9550cea81ccd6d6187c115eeb56
I guess that was a typo by Yehuda.