Skip to content

Commit

Permalink
Fix center tag to expand with new text-center class
Browse files Browse the repository at this point in the history
  • Loading branch information
kball committed Mar 9, 2016
1 parent d93aceb commit d4e0ef0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/componentFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = function(element) {
if (element.children().length > 0) {
element.children()
.attr('align', 'center')
.addClass('center');
.addClass('text-center');
}

element.attr('data-parsed', '');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inky",
"version": "1.2.2",
"version": "1.2.3",
"description": "Convert a simple HTML syntax into tables compatible with Foundation for Emails.",
"author": "ZURB <[email protected]> (http://foundation.zurb.com)",
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions test/components.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
var compare = require('./lib/compare');

describe('Center', () => {
it('applies a center class and center alignment attribute to the first child', () => {
it('applies a text-center class and center alignment attribute to the first child', () => {
var input = `
<center>
<div></div>
</center>
`;
var expected = `
<center data-parsed="">
<div align="center" class="center"></div>
<div align="center" class="text-center"></div>
</center>
`;

Expand All @@ -26,7 +26,7 @@ describe('Center', () => {

var expected = `
<center data-parsed="">
<center align="center" class="center" data-parsed="">
<center align="center" class="text-center" data-parsed="">
</center>
</center>
`;
Expand Down Expand Up @@ -87,7 +87,7 @@ describe('Button', () => {
<table>
<tr>
<td>
<center data-parsed=""><a href="http://zurb.com" align="center" class="center">Button</a></center>
<center data-parsed=""><a href="http://zurb.com" align="center" class="text-center">Button</a></center>
</td>
</tr>
</table>
Expand Down

0 comments on commit d4e0ef0

Please sign in to comment.