Tag Formats

1 view
Skip to first unread message

Geoffrey Sneddon

unread,
Sep 22, 2007, 9:21:43 AM9/22/07
to habar...@googlegroups.com
I've been trying to understand the formats that we currently allow
for tags, and I think the following is right:

1. Double quote + non-whitespace character + any character except
double quote + double quote + non-word character or end of string.
2. Space or start of string + single quote + non-whitespace character
+ any character except single quote + single quote + non-word
character or end of string.
3. Any character except for comma.

This means that Post::parsetags( 'test, tags' ) == Post::parsetags
( '"test" tags' ) == Post::parsetags( "'test' tags" ) ==
Post::parsetags( '"test", tags' ) == Post::parsetags( "'test', tags" );

Surely we should require a comma regardless of form? Why do we not
allow any character to be escaped? It'd make sense to at the very
least be able to escape the three "magic" characters (single/double
quotes, commas). I'll post some code when I have time showing how I'd
parse tags.

- Geoffrey Sneddon

Reply all
Reply to author
Forward
0 new messages