Browse Source

Fixed typos in comment

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

2
lib/parser_block.js

@ -80,7 +80,7 @@ ParserBlock.prototype.tokenize = function (state, startLine, endLine) {
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
state.tight = !hasEmptyLines;

16
lib/rules_block/list.js

@ -5,7 +5,7 @@
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.
function skipBulletListMarker(state, startLine) {
var marker, pos, max, ch;
@ -33,7 +33,7 @@ function skipBulletListMarker(state, startLine) {
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.
function skipOrderedListMarker(state, startLine) {
var ch,
@ -210,12 +210,10 @@ module.exports = function list(state, startLine, endLine, silent) {
while (pos < max) {
ch = state.src.charCodeAt(pos);
if (isSpace(ch)) {
if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[nextLine]) % 4;
} else {
offset++;
}
if (ch === 0x09) {
offset += 4 - (offset + state.bsCount[nextLine]) % 4;
} else if (ch === 0x20) {
offset++;
} else {
break;
}
@ -316,7 +314,7 @@ module.exports = function list(state, startLine, endLine, silent) {
if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; }
}
// Finilize list
// Finalize list
if (isOrdered) {
token = state.push('ordered_list_close', 'ol', -1);
} else {

Loading…
Cancel
Save