Skip to content

Commit

Permalink
Merge pull request #70 from joaocunha/convert-non-breaking-space
Browse files Browse the repository at this point in the history
Switch <spacer>'s non-breaking spaces from &#xA0; to &nbsp;
  • Loading branch information
kball authored Apr 19, 2017
2 parents 39d2510 + 050a0c4 commit 2345421
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions lib/componentFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ module.exports = function(element) {
if (element.attr('size-sm') || element.attr('size-lg')) {
if (element.attr('size-sm')) {
size = (element.attr('size-sm'));
html += format('<table %s class="%s hide-for-large"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>', attrs);
html += format('<table %s class="%s hide-for-large"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&nbsp;</td></tr></tbody></table>', attrs);
}
if (element.attr('size-lg')) {
size = (element.attr('size-lg'));
html += format('<table %s class="%s show-for-large"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>', attrs);
html += format('<table %s class="%s show-for-large"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&nbsp;</td></tr></tbody></table>', attrs);
}
} else {
size = (element.attr('size')) || 16;
html += format('<table %s class="%s"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&#xA0;</td></tr></tbody></table>', attrs);
html += format('<table %s class="%s"><tbody><tr><td height="'+size+'px" style="font-size:'+size+'px;line-height:'+size+'px;">&nbsp;</td></tr></tbody></table>', attrs);
}

if( element.attr('size-sm') && element.attr('size-lg') ) {
Expand Down
14 changes: 7 additions & 7 deletions test/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ describe('Spacer', () => {
<table class="spacer">
<tbody>
<tr>
<td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
<td height="10px" style="font-size:10px;line-height:10px;">&nbsp;</td>
</tr>
</tbody>
</table>
Expand All @@ -335,7 +335,7 @@ describe('Spacer', () => {
<table class="spacer">
<tbody>
<tr>
<td height="16px" style="font-size:16px;line-height:16px;">&#xA0;</td>
<td height="16px" style="font-size:16px;line-height:16px;">&nbsp;</td>
</tr>
</tbody>
</table>
Expand All @@ -350,7 +350,7 @@ describe('Spacer', () => {
<table class="spacer hide-for-large">
<tbody>
<tr>
<td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
<td height="10px" style="font-size:10px;line-height:10px;">&nbsp;</td>
</tr>
</tbody>
</table>
Expand All @@ -365,7 +365,7 @@ describe('Spacer', () => {
<table class="spacer show-for-large">
<tbody>
<tr>
<td height="20px" style="font-size:20px;line-height:20px;">&#xA0;</td>
<td height="20px" style="font-size:20px;line-height:20px;">&nbsp;</td>
</tr>
</tbody>
</table>
Expand All @@ -380,14 +380,14 @@ describe('Spacer', () => {
<table class="spacer hide-for-large">
<tbody>
<tr>
<td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
<td height="10px" style="font-size:10px;line-height:10px;">&nbsp;</td>
</tr>
</tbody>
</table>
<table class="spacer show-for-large">
<tbody>
<tr>
<td height="20px" style="font-size:20px;line-height:20px;">&#xA0;</td>
<td height="20px" style="font-size:20px;line-height:20px;">&nbsp;</td>
</tr>
</tbody>
</table>
Expand All @@ -402,7 +402,7 @@ describe('Spacer', () => {
<table class="spacer bgcolor">
<tbody>
<tr>
<td height="10px" style="font-size:10px;line-height:10px;">&#xA0;</td>
<td height="10px" style="font-size:10px;line-height:10px;">&nbsp;</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 2345421

Please sign in to comment.