Browse Source

Fixed typos in comment

pull/359/head
Ullallulloo 8 years ago
parent
commit
bf4ba21254
  1. 2
      lib/parser_block.js
  2. 10
      lib/rules_block/list.js

2
lib/parser_block.js

@ -80,7 +80,7 @@ ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
if (ok) { break; } if (ok) { break; }
} }
// set state.tight iff we had an empty line before current tag // set state.tight if we had an empty line before current tag
// i.e. latest empty line should not count // i.e. latest empty line should not count
state.tight = !hasEmptyLines; state.tight = !hasEmptyLines;

10
lib/rules_block/list.js

@ -5,7 +5,7 @@
var isSpace = require('../common/utils').isSpace; var isSpace = require('../common/utils').isSpace;
// Search `[-+*][\n ]`, returns next pos arter marker on success // Search `[-+*][\n ]`, returns next pos after marker on success
// or -1 on fail. // or -1 on fail.
function skipBulletListMarker(state, startLine) { function skipBulletListMarker(state, startLine) {
var marker, pos, max, ch; var marker, pos, max, ch;
@ -33,7 +33,7 @@ function skipBulletListMarker(state, startLine) {
return pos; return pos;
} }
// Search `\d+[.)][\n ]`, returns next pos arter marker on success // Search `\d+[.)][\n ]`, returns next pos after marker on success
// or -1 on fail. // or -1 on fail.
function skipOrderedListMarker(state, startLine) { function skipOrderedListMarker(state, startLine) {
var ch, var ch,
@ -210,12 +210,10 @@ module.exports = function list(state, startLine, endLine, silent) {
while (pos < max) { while (pos < max) {
ch = state.src.charCodeAt(pos); ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) { if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[nextLine]) % 4; offset += 4 - (offset + state.bsCount[nextLine]) % 4;
} else { } else if (ch === 0x20) {
offset++; offset++;
}
} else { } else {
break; break;
} }
@ -316,7 +314,7 @@ module.exports = function list(state, startLine, endLine, silent) {
if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; } if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }
} }
// Finilize list // Finalize list
if (isOrdered) { if (isOrdered) {
token = state.push('ordered_list_close', 'ol', -1); token = state.push('ordered_list_close', 'ol', -1);
} else { } else {

Loading…
Cancel
Save