[go: nahoru, domu]

Skip to content

Commit

Permalink
style: do not violate 80 col limit. no double quotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Aug 8, 2013
1 parent f74978c commit aba62d0
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lib/marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ InlineLexer.prototype.smartypants = function(text) {
// opening singles
.replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
// closing singles & apostrophes
.replace(/'/g, "\u2019")
.replace(/'/g, '\u2019')
// opening doubles
.replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
// closing doubles
Expand Down Expand Up @@ -889,9 +889,11 @@ Parser.prototype.tok = function() {
body += '<thead>\n<tr>\n';
for (i = 0; i < this.token.header.length; i++) {
heading = this.inline.output(this.token.header[i]);
body += this.token.align[i]
? '<th style="text-align:' + this.token.align[i] + '">' + heading + '</th>\n'
: '<th>' + heading + '</th>\n';
body += '<th';
if (this.token.align[i]) {
body += ' style="text-align:' + this.token.align[i] + '"';
}
body += '>' + heading + '</th>\n';
}
body += '</tr>\n</thead>\n';

Expand All @@ -902,9 +904,11 @@ Parser.prototype.tok = function() {
body += '<tr>\n';
for (j = 0; j < row.length; j++) {
cell = this.inline.output(row[j]);
body += this.token.align[j]
? '<td style="text-align:' + this.token.align[j] + '">' + cell + '</td>\n'
: '<td>' + cell + '</td>\n';
body += '<td';
if (this.token.align[j]) {
body += ' style="text-align:' + this.token.align[j] + '"';
}
body += '>' + cell + '</td>\n';
}
body += '</tr>\n';
}
Expand Down

0 comments on commit aba62d0

Please sign in to comment.