The first will convert a double quote character into two single quotes only if $$quote is true. From that it appears that $$quote is a flag to mark if an opening quote has been found but its partner has not. I'll go further to assume that $text is a chunk at a time, and this takes care of quotes that span chunks.
In reply to Re: logic for smart quotes - what does this code mean?
by chromatic
in thread logic for smart quotes - what does this code mean?
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |