code: private int getQuoteToken( String content, int startOffset, int endOffset ) {
          String quoteDelimiter = content.substring(startOffset, startOffset + 1);
          String escapeString = getEscapeString(quoteDelimiter);
          int index;
          int endOfQuote = startOffset;
          // skip over the escape quotes in this quote
          index = content.indexOf(escapeString, endOfQuote + 1);
          while( (index > -1) && (index < endOffset) ) {
              endOfQuote = index + 1;
              index = content.indexOf(escapeString, endOfQuote);
          }
          // now find the matching delimiter
          index = content.indexOf(quoteDelimiter, endOfQuote + 1);
          if ((index < 0) || (index > endOffset))
              endOfQuote = endOffset;
          else
              endOfQuote = index;
          doc.setCharacterAttributes(startOffset, endOfQuote - startOffset + 1, quote, false);
          return endOfQuote + 1;
      }
docs: /*
  Parse the line to get the quotes and highlight it