private void parseQuotedSpans(SpanManager sm,Span s,List<Span> quotedSpans,String quotation){
  final int qlen=quotation.length();
  int start=sm.indexOf(quotation,s.getStart(),s.getEnd());
  while (start != -1) {
    int end=sm.indexOf(quotation,start + qlen,s.getEnd());
    if (end == -1) {
      break;
    }
    Span qs=new Span(start,end);
    quotedSpans.add(qs);
    if (calculateSrcSpans) {
      qs.setSrcSpan(new SrcSpan(sm.getSrcPos(start),sm.getSrcPos(end + qlen - 1) + 1));
    }
    sm.delete(end,end + qlen);
    sm.delete(start,start + qlen);
    start=sm.indexOf(quotation,qs.getEnd(),s.getEnd());
  }
}

private void parseQuotedSpans ( SpanManager sm , Span s , List < Span > quotedSpans , String quotation ) { final int qlen = quotation . length ( ) ; int start = sm . indexOf ( quotation , s . getStart ( ) , s . getEnd ( ) ) ; while ( start != - 1 ) { int end = sm . indexOf ( quotation , start + qlen , s . getEnd ( ) ) ; if ( end == - 1 ) { break ; } Span qs = new Span ( start , end ) ; quotedSpans . add ( qs ) ; if ( calculateSrcSpans ) { qs . setSrcSpan ( new SrcSpan ( sm . getSrcPos ( start ) , sm . getSrcPos ( end + qlen - 1 ) + 1 ) ) ; } sm . delete ( end , end + qlen ) ; sm . delete ( start , start + qlen ) ; start = sm . indexOf ( quotation , qs . getEnd ( ) , s . getEnd ( ) ) ; } }
searches the range given by the span s for the double occurence of " quotation " and puts the results in the list quotedspans . the quotation tags will be deleted .
