On Sun, Jan 18, 2015 at 06:12:21PM -0800, San wrote:
> Thanks, I'm sure you're right. I should have seen that.
> 
> On the broader question of whether I need to "fix" this at all... does the 
> fact that a function doesn't balance in BBEdit imply that the function is 
> brittle, i.e. might throw an error under some circumstances, even though 
> I'm not seeing any errors?

It actually implies that the Balance Tags feature is brittle.  It has to
deal with double-quoted strings, single-quoted strings, regular
expressions, comments, and so on, and sometimes it gets it wrong.

An alternative way to resolve this is to use "\x29" instead of "\)" in the
regular expression, as \x29 is the hexadecimal escape sequence for a right
parenthesis:

/^transparent|rgba.*,\s?0\s?\x29$/i


By the way, I'm concerned about the structure of this regular expression.
It matches either:

1) "transparent" at the start of the string; or
2) "rgba", followed by any number of characters, then ",", an optional
   whitespace character, "0", an optional whitespace character, and ")", at
   the end of the string.

For example, it would match both of these strings:

"transparent blah blah blah"
"blah blah blah rgba blah blah blah, 0 )"

Is that really what is intended?

Ronald

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].

Reply via email to