Skip to content

Commit

Permalink
Merge pull request #221 from Adduc/master
Browse files Browse the repository at this point in the history
Align td and th with css instead of align property
  • Loading branch information
chjj committed Aug 7, 2013
2 parents 9eafd2e + 09e83d5 commit 0a9e734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ Parser.prototype.tok = function() {
for (i = 0; i < this.token.header.length; i++) {
heading = this.inline.output(this.token.header[i]);
body += this.token.align[i]
? '<th align="' + this.token.align[i] + '">' + heading + '</th>\n'
? '<th style="text-align:' + this.token.align[i] + '">' + heading + '</th>\n'
: '<th>' + heading + '</th>\n';
}
body += '</tr>\n</thead>\n';
Expand All @@ -901,7 +901,7 @@ Parser.prototype.tok = function() {
for (j = 0; j < row.length; j++) {
cell = this.inline.output(row[j]);
body += this.token.align[j]
? '<td align="' + this.token.align[j] + '">' + cell + '</td>\n'
? '<td style="text-align:' + this.token.align[j] + '">' + cell + '</td>\n'
: '<td>' + cell + '</td>\n';
}
body += '</tr>\n';
Expand Down

0 comments on commit 0a9e734

Please sign in to comment.