Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
c1c97b47
Commit
c1c97b47
authored
Dec 19, 2012
by
Oleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove leading white space check
parent
fd2af63b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
manipulation.js
src/manipulation.js
+1
-8
support.js
src/support.js
+1
-4
No files found.
src/manipulation.js
View file @
c1c97b47
var
rleadingWhitespace
=
/^
\s
+/
,
var
rxhtmlTag
=
/<
(?!
area|br|col|embed|hr|img|input|link|meta|param
)(([\w
:
]
+
)[^
>
]
*
)\/
>/gi
,
rxhtmlTag
=
/<
(?!
area|br|col|embed|hr|img|input|link|meta|param
)(([\w
:
]
+
)[^
>
]
*
)\/
>/gi
,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtagName
=
/<
([\w
:
]
+
)
/
,
rtbody
=
/<tbody/i
,
rtbody
=
/<tbody/i
,
rhtml
=
/<|&#
?\w
+;/
,
rhtml
=
/<|&#
?\w
+;/
,
...
@@ -195,7 +194,6 @@ jQuery.fn.extend({
...
@@ -195,7 +194,6 @@ jQuery.fn.extend({
// See if we can take a shortcut and just use innerHTML
// See if we can take a shortcut and just use innerHTML
if
(
typeof
value
===
"string"
&&
!
rnoInnerhtml
.
test
(
value
)
&&
if
(
typeof
value
===
"string"
&&
!
rnoInnerhtml
.
test
(
value
)
&&
(
jQuery
.
support
.
leadingWhitespace
||
!
rleadingWhitespace
.
test
(
value
)
)
&&
!
wrapMap
[
(
rtagName
.
exec
(
value
)
||
[
""
,
""
]
)[
1
].
toLowerCase
()
]
)
{
!
wrapMap
[
(
rtagName
.
exec
(
value
)
||
[
""
,
""
]
)[
1
].
toLowerCase
()
]
)
{
value
=
value
.
replace
(
rxhtmlTag
,
"<$1></$2>"
);
value
=
value
.
replace
(
rxhtmlTag
,
"<$1></$2>"
);
...
@@ -617,11 +615,6 @@ jQuery.extend({
...
@@ -617,11 +615,6 @@ jQuery.extend({
tmp
=
tmp
.
lastChild
;
tmp
=
tmp
.
lastChild
;
}
}
// Manually add leading whitespace removed by IE
if
(
!
jQuery
.
support
.
leadingWhitespace
&&
rleadingWhitespace
.
test
(
elem
)
)
{
ret
.
push
(
context
.
createTextNode
(
rleadingWhitespace
.
exec
(
elem
)[
0
]
)
);
}
// Remove IE's autoinserted <tbody> from table fragments
// Remove IE's autoinserted <tbody> from table fragments
if
(
!
jQuery
.
support
.
tbody
)
{
if
(
!
jQuery
.
support
.
tbody
)
{
...
...
src/support.js
View file @
c1c97b47
...
@@ -5,7 +5,7 @@ jQuery.support = (function() {
...
@@ -5,7 +5,7 @@ jQuery.support = (function() {
// Setup
// Setup
div
.
setAttribute
(
"className"
,
"t"
);
div
.
setAttribute
(
"className"
,
"t"
);
div
.
innerHTML
=
"
<table></table><a href='/a'>a</a><input type='checkbox'/>"
;
div
.
innerHTML
=
"<table></table><a href='/a'>a</a><input type='checkbox'/>"
;
// Support tests won't run in some limited or non-browser environments
// Support tests won't run in some limited or non-browser environments
all
=
div
.
getElementsByTagName
(
"*"
);
all
=
div
.
getElementsByTagName
(
"*"
);
...
@@ -24,9 +24,6 @@ jQuery.support = (function() {
...
@@ -24,9 +24,6 @@ jQuery.support = (function() {
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
getSetAttribute
:
div
.
className
!==
"t"
,
getSetAttribute
:
div
.
className
!==
"t"
,
// IE strips leading whitespace when .innerHTML is used
leadingWhitespace
:
div
.
firstChild
.
nodeType
===
3
,
// Make sure that tbody elements aren't automatically inserted
// Make sure that tbody elements aren't automatically inserted
// IE will insert them into empty tables
// IE will insert them into empty tables
tbody
:
!
div
.
getElementsByTagName
(
"tbody"
).
length
,
tbody
:
!
div
.
getElementsByTagName
(
"tbody"
).
length
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment