-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
differentiate between nbsp and other whitespace (#348)
- Loading branch information
1 parent
d8dbe4e
commit ce6178d
Showing
5 changed files
with
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const whitespace = /\s/; | ||
export const whitespace = /[ \t\r\n]/; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
html: `<span> </span>`, | ||
|
||
test ( assert, component, target ) { | ||
const text = target.querySelector( 'span' ).textContent; | ||
assert.equal( text.charCodeAt( 0 ), 160 ); | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<span> </span> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<span> </span> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"hash": 2678229240, | ||
"html": { | ||
"start": 0, | ||
"end": 19, | ||
"type": "Fragment", | ||
"children": [ | ||
{ | ||
"start": 0, | ||
"end": 19, | ||
"type": "Element", | ||
"name": "span", | ||
"attributes": [], | ||
"children": [ | ||
{ | ||
"start": 6, | ||
"end": 12, | ||
"type": "Text", | ||
"data": " " | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"css": null, | ||
"js": null | ||
} |