livecomment.js
function extractCommentTagFromLine(fileext, line) {
          line = line.trim();
          // CHECK FORMAT [
          var b;
          function chkfmt(b) {
            if (line.indexOf(b) == 0 && line.indexOf('[') == line.length-1) // begin
              return [line.substr(b.length, line.length-b.length-1).trim(), 0];
            if (line.indexOf(b) == 0 && line.indexOf(']') == line.length-1 && line.indexOf('[') == -1) // end
              return [line.substr(b.length, line.length-b.length-1).trim(), 1];
            return null;
          };
          // CHECK FORMAT ]

          // SUPPORT FORMATS [
          switch (fileext) {
            case '.js':
            case '.java':
            case '.c':
            case '.h':
            case '.cpp':
            case '.hpp':
            case '.less':
            case '.m':
            case '.mm':
              return chkfmt('//') || false;
            case '.css':
              return chkfmt('/*') || false;
            case '.acpul':
            case '.sh':
            case '.py':
            case '.pro':
              return chkfmt('#') || false;
            case '.ejs':
            case '.jade':
            case '.sass':
            case '.styl':
            case '.coffee':
              break;
            default:
              return null;
          }
          // SUPPORT FORMATS ]
          return false;
        }
function extractCommentTagFromLine(fileext, line) {
          line = line.trim();
          // CHECK FORMAT [
          var b;
          function chkfmt(b) {
            if (line.indexOf(b) == 0 && line.indexOf('[') == line.length-1) // begin
              return [line.substr(b.length, line.length-b.length-1).trim(), 0];
            if (line.indexOf(b) == 0 && line.indexOf(']') == line.length-1 && line.indexOf('[') == -1) // end
              return [line.substr(b.length, line.length-b.length-1).trim(), 1];
            return null;
          };
          // CHECK FORMAT ]

          // SUPPORT FORMATS [
          switch (fileext) {
            case '.js':
            case '.java':
            case '.c':
            case '.h':
            case '.cpp':
            case '.hpp':
            case '.less':
            case '.m':
            case '.mm':
              return chkfmt('//') || false;
            case '.css':
              return chkfmt('/*') || false;
            case '.acpul':
            case '.sh':
            case '.py':
            case '.pro':
              return chkfmt('#') || false;
            case '.ejs':
            case '.jade':
            case '.sass':
            case '.styl':
            case '.coffee':
              break;
            default:
              return null;
          }
          // SUPPORT FORMATS ]
          return false;
        }
function extractCommentTagFromLine ( fileext , line ) { line = line . trim ( ) ; // CHECK FORMAT [ var b ; function chkfmt ( b ) { if ( line . indexOf ( b ) == 0 && line . indexOf ( '[' ) == line . length - 1 ) // begin return [ line . substr ( b . length , line . length - b . length - 1 ) . trim ( ) , 0 ] ; if ( line . indexOf ( b ) == 0 && line . indexOf ( ']' ) == line . length - 1 && line . indexOf ( '[' ) == - 1 ) // end return [ line . substr ( b . length , line . length - b . length - 1 ) . trim ( ) , 1 ] ; return null ; } ; // CHECK FORMAT ] // SUPPORT FORMATS [ switch ( fileext ) { case '.js' : case '.java' : case '.c' : case '.h' : case '.cpp' : case '.hpp' : case '.less' : case '.m' : case '.mm' : return chkfmt ( '//' ) || false ; case '.css' : return chkfmt ( '/*' ) || false ; case '.acpul' : case '.sh' : case '.py' : case '.pro' : return chkfmt ( '#' ) || false ; case '.ejs' : case '.jade' : case '.sass' : case '.styl' : case '.coffee' : break ; default : return null ; } // SUPPORT FORMATS ] return false ; }
custom comment format use config.extractCommentTagFromLine [
custom comment format use config . extractCommentTagFromLine [