A key trick to deal with the entity encoding issues is use a CDATA block, like
this:
<key>Function Pattern</key>
<string><![CDATA[(?xs:
...
)]]></string>
Where you replace the ... with the pattern you wanted, which can also be spread
across multiple lines for readability.
Inside CDATA you don't need to use XML/HTML entities like <, you just write
your less-thans normally etc.
-- Darren Duncan
On 2024-06-18 12:28 p.m., Alfredo wrote:
Excellent suggestion, Rich.
I'm playing around with various of our mutual robot friend's proposals.
One of them looks promising:
<key>Function Pattern</key>
<string>\b(?:void|[\w<>\[\]]+)\s+(\w+)\s*\([^)]*\)\s*(?=\{|\=>)</string>
But the syntax checker complains about the "<" in
[\w<>\[\]]
Unencoded entity found; “<” needs to be encoded as “<”
Fair enough. If I change the pattern to this:
<key>Function Pattern</key>
<string>\b(?:void|[\w<>\[\]]+)\s+(\w+)\s*\([^)]*\)\s*(?=\{|\=>)</string>
the syntax checker doesn't complain but BBEdit's Function Navigator doesn't
navigate functions (after a BBEdit restart, of course).
--
This is the BBEdit Talk public discussion group. If you have a feature request or believe that
the application isn't working correctly, please email "[email protected]" rather
than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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 view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/6a0d02dc-e0cf-4d88-8a95-807854ff7887%40darrenduncan.net.