Then what if you wanted to convert a & to '&'?
-- Sune.
Hmm. "&" doesn't match any numeric or named entity, so ...
if the selection is "&" and the user chooses the command "convert to named entity" it should still be upconverted to &
A simple rule would be
if ( regexp("&.{3,4};", str) ) { //string looks like a valid numeric entity convertNumericToNamedEntity(str); else //string looks like plain text convertCharToNamedEntity(str); }
On 12/11/2005, at 9:04 AM, Sune Foldager wrote:
On 11/11/2005, at 22.46, Timothy Bates wrote:
Merci for pointing out how it works, but I guess I can't see the value in a converter which can't see that it has a numeric as input and do the right thing. Amp is just wrong as an output.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate