Skip to content

Commit

Permalink
Prevent string comparison from failing when using non-strict equality
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyclarke committed May 5, 2015
1 parent 5ca4e07 commit 47bcee4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dss.js
Expand Up @@ -140,7 +140,7 @@ var dss = (function(){
* @return (String) A cleaned up text block
*/
_dss.normalize = function(text_block){

// Strip out any preceding [whitespace]* that occur on every line. Not
// the smartest, but I wonder if I care.
text_block = text_block.replace(/^(\s*\*+)/, '');
Expand Down Expand Up @@ -346,14 +346,14 @@ var dss = (function(){
if(_dss.detect(line))
temp = parser(temp, _dss.normalize(line), block, lines);
});

// Push to blocks if object isn't empty
if(_dss.size(temp))
blocks.push(temp);
temp = {};

});
});

// Execute callback with filename and blocks
callback({ blocks: blocks });

Expand Down Expand Up @@ -417,7 +417,7 @@ dss.parser('markup', function(i, line, block, file, parserName){
if (lines.length <= 2)
line = dss.trim(line);

if (line && line != parserMarker)
if (line && line.indexOf( parserMarker ) == -1)
ret.push(line);

});
Expand Down

0 comments on commit 47bcee4

Please sign in to comment.