Merge pull request #352 from sveltejs/gh-348

differentiate between nbsp and other whitespace
pull/357/head
Rich Harris 8 years ago committed by GitHub
commit a362b436b2

@ -1 +1 @@
export const whitespace = /\s/;
export const whitespace = /[ \t\r\n]/;

@ -0,0 +1,8 @@
export default {
html: `<span>&nbsp;</span>`,
test ( assert, component, target ) {
const text = target.querySelector( 'span' ).textContent;
assert.equal( text.charCodeAt( 0 ), 160 );
}
};

@ -0,0 +1 @@
<span>&nbsp;</span>

@ -0,0 +1 @@
<span>&nbsp;</span>

@ -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
}
Loading…
Cancel
Save