public IElementType capturePodBlock(){
  CharSequence buffer=getBuffer();
  int tokenStart=getTokenEnd();
  setTokenStart(tokenStart);
  int bufferEnd=getBufferEnd();
  int currentPosition=tokenStart;
  int linePos=currentPosition;
  int linesNumber=0;
  while (true) {
    while (linePos < bufferEnd && buffer.charAt(linePos) != '\n') {
      linePos++;
    }
    if (linePos < bufferEnd && buffer.charAt(linePos) == '\n') {
      linePos++;
    }
    CharSequence line=buffer.subSequence(currentPosition,linePos);
    currentPosition=linePos;
    if (linePos == bufferEnd || StringUtil.startsWith(line,"=cut") && linesNumber > 0) {
      if (linePos < bufferEnd) {
        linePos--;
      }
      setTokenEnd(linePos);
      break;
    }
    linesNumber++;
  }
  return POD;
}

public IElementType capturePodBlock ( ) { CharSequence buffer = getBuffer ( ) ; int tokenStart = getTokenEnd ( ) ; setTokenStart ( tokenStart ) ; int bufferEnd = getBufferEnd ( ) ; int currentPosition = tokenStart ; int linePos = currentPosition ; int linesNumber = 0 ; while ( true ) { while ( linePos < bufferEnd && buffer . charAt ( linePos ) != '\n' ) { linePos ++ ; } if ( linePos < bufferEnd && buffer . charAt ( linePos ) == '\n' ) { linePos ++ ; } CharSequence line = buffer . subSequence ( currentPosition , linePos ) ; currentPosition = linePos ; if ( linePos == bufferEnd || StringUtil . startsWith ( line , "=cut" ) && linesNumber > 0 ) { if ( linePos < bufferEnd ) { linePos -- ; } setTokenEnd ( linePos ) ; break ; } linesNumber ++ ; } return POD ; }
captures pod block from current position
