[gutvol-p] Re: Hi, about filtering the license information.

Paulo Levi i30817 at gmail.com
Thu Dec 24 14:00:12 PST 2009


Removed the possibility using a class StringBuilder.

            boolean isMarkupStart = line.startsWith("\n***");
            if (isMarkupStart) {
                isStart = line.contains(START_TAG);
                isEnd = line.contains(END_TAG);
                inTag = isStart || isEnd;
            }
            if(inTag){
                tagForMatch.append(line);
            }else if (isInValidText) {
                super.insertString(bypass, offset, line, attr);
            }
            //The stringbuffer is to be sure *** is not broken into many
lines
            if (inTag && tagForMatch.toString().endsWith("***")) {
                isInValidText = isStart && !isEnd;
                inTag = false;
                tagForMatch.setLength(0);
            }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/html
Size: 871 bytes
Desc: not available
URL: <https://lists.pglaf.org/pipermail/gutvol-p/attachments/20091224/674d0da6/attachment.txt>


More information about the gutvol-p mailing list