lib/stmd.js
function(inlines) {
  if (this.peek() == '\n') {
    this.pos++;
    var last = inlines[inlines.length - 1];
    if (last && last.t == 'Str' && last.c.slice(-2) == '  ') {
      last.c = last.c.replace(/ *$/,'');
      inlines.push({ t: 'Hardbreak' });
    } else {
      if (last && last.t == 'Str' && last.c.slice(-1) == ' ') {
        last.c = last.c.slice(0, -1);
      }
      inlines.push({ t: 'Softbreak' });
    }
    return 1;
  } else {
    return 0;
  }
}
function(inlines) {
  if (this.peek() == '\n') {
    this.pos++;
    var last = inlines[inlines.length - 1];
    if (last && last.t == 'Str' && last.c.slice(-2) == '  ') {
      last.c = last.c.replace(/ *$/,'');
      inlines.push({ t: 'Hardbreak' });
    } else {
      if (last && last.t == 'Str' && last.c.slice(-1) == ' ') {
        last.c = last.c.slice(0, -1);
      }
      inlines.push({ t: 'Softbreak' });
    }
    return 1;
  } else {
    return 0;
  }
}
function ( inlines ) { if ( this . peek ( ) == '\n' ) { this . pos ++ ; var last = inlines [ inlines . length - 1 ] ; if ( last && last . t == 'Str' && last . c . slice ( - 2 ) == '  ' ) { last . c = last . c . replace ( /  *$ / , '' ) ; inlines . push ( { t : 'Hardbreak' } ) ; } else { if ( last && last . t == 'Str' && last . c . slice ( - 1 ) == ' ' ) { last . c = last . c . slice ( 0 , - 1 ) ; } inlines . push ( { t : 'Softbreak' } ) ; } return 1 ; } else { return 0 ; } }
Parse a newline.  If it was preceded by two spaces, return a hard line break; otherwise a soft line break.
Parse a newline . If it was preceded by two spaces return a hard line break ; otherwise a soft line break .