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) {
this.src = src;
this.env = env || {};
this.env = env;
this.options = self.options;
this.tokens = [];
this.inlineMode = false;

4
lib/rules_block/code.js

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

4
lib/rules_block/lheading.js

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

Loading…
Cancel
Save