
On Tue, Apr 07, 2009 at 07:27:55PM +0100, Toby Speight wrote:
Here's a patch that I think I like. I've given it a reasonable exercise, including the error cases I could think of, and I didn't see any of the magic smoke escaping. If there are no issues, would someone commit it? Thanks.
I like the approach using a ValueFilter which keeps the code separate and used only when needed. However, I believe that building the functionallity out of prev and subst is too low level and it would be be better to have a single filter that does everything that is necessary to add the symbol; for example ${ref|highway-symbol=box}. I say this because not all of the special values go at the beginning of the string. Some of them are used to separate the parts of a streetname (eg between 'Main' and 'Street' in "Main Street"). Also the required regular expression to fix up the ref could get complex as shown in another message in the thread. The substitution filter might be a good thing to have for other purposes anyway. ..Steve