style: do not violate 80 col limit. no double quotes.

This commit is contained in:
Christopher Jeffrey 2013-08-08 11:29:26 -05:00
parent f74978c3cd
commit aba62d01d6

View File

@ -735,7 +735,7 @@ InlineLexer.prototype.smartypants = function(text) {
// opening singles // opening singles
.replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
// closing singles & apostrophes // closing singles & apostrophes
.replace(/'/g, "\u2019") .replace(/'/g, '\u2019')
// opening doubles // opening doubles
.replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
// closing doubles // closing doubles
@ -889,9 +889,11 @@ Parser.prototype.tok = function() {
body += '<thead>\n<tr>\n'; body += '<thead>\n<tr>\n';
for (i = 0; i < this.token.header.length; i++) { for (i = 0; i < this.token.header.length; i++) {
heading = this.inline.output(this.token.header[i]); heading = this.inline.output(this.token.header[i]);
body += this.token.align[i] body += '<th';
? '<th style="text-align:' + this.token.align[i] + '">' + heading + '</th>\n' if (this.token.align[i]) {
: '<th>' + heading + '</th>\n'; body += ' style="text-align:' + this.token.align[i] + '"';
}
body += '>' + heading + '</th>\n';
} }
body += '</tr>\n</thead>\n'; body += '</tr>\n</thead>\n';
@ -902,9 +904,11 @@ Parser.prototype.tok = function() {
body += '<tr>\n'; body += '<tr>\n';
for (j = 0; j < row.length; j++) { for (j = 0; j < row.length; j++) {
cell = this.inline.output(row[j]); cell = this.inline.output(row[j]);
body += this.token.align[j] body += '<td';
? '<td style="text-align:' + this.token.align[j] + '">' + cell + '</td>\n' if (this.token.align[j]) {
: '<td>' + cell + '</td>\n'; body += ' style="text-align:' + this.token.align[j] + '"';
}
body += '>' + cell + '</td>\n';
} }
body += '</tr>\n'; body += '</tr>\n';
} }