Browse Source

Removed unnecessary conditions

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
2af5f87f02
  1. 2
      lib/index.js
  2. 4
      lib/rules_block/code.js
  3. 4
      lib/rules_block/lheading.js

2
lib/index.js

@ -20,7 +20,7 @@ var config = {
function StateCore(self, src, env) { function StateCore(self, src, env) {
this.src = src; this.src = src;
this.env = env || {}; this.env = env;
this.options = self.options; this.options = self.options;
this.tokens = []; this.tokens = [];
this.inlineMode = false; this.inlineMode = false;

4
lib/rules_block/code.js

@ -3,7 +3,7 @@
'use strict'; 'use strict';
module.exports = function code(state, startLine, endLine, silent) { module.exports = function code(state, startLine, endLine/*, silent*/) {
var nextLine, last; var nextLine, last;
if (state.tShift[startLine] - state.blkIndent < 4) { return false; } if (state.tShift[startLine] - state.blkIndent < 4) { return false; }
@ -23,8 +23,6 @@ module.exports = function code(state, startLine, endLine, silent) {
break; break;
} }
if (silent) { return true; }
state.line = nextLine; state.line = nextLine;
state.tokens.push({ state.tokens.push({
type: 'code', type: 'code',

4
lib/rules_block/lheading.js

@ -3,7 +3,7 @@
'use strict'; 'use strict';
module.exports = function lheading(state, startLine, endLine, silent) { module.exports = function lheading(state, startLine, endLine/*, silent*/) {
var marker, pos, max, var marker, pos, max,
next = startLine + 1; next = startLine + 1;
@ -29,8 +29,6 @@ module.exports = function lheading(state, startLine, endLine, silent) {
if (pos < max) { return false; } if (pos < max) { return false; }
if (silent) { return true; }
pos = state.bMarks[startLine] + state.tShift[startLine]; pos = state.bMarks[startLine] + state.tShift[startLine];
state.line = next + 1; state.line = next + 1;

Loading…
Cancel
Save