Please define the behaviour of non-matching parseTags

#1 : 04/07-25 16:27
Chris
Posts: 38
User Guide says:

app.parseTags(tags): string Parses the specified string for tags and returns the result.

so one can only guess the result of non-match is empty string.

Thanks.
#2 : 04/07-25 23:37
Delta Foxtrot
Posts: 521
Reply to #1:

It's an empty string unless it somehow generates a parse error.
#3 : 05/07-25 12:25
Chris
Posts: 38
Reply to #2:

Thanks but sorry if I was unclear. Mine was a request to the developer to define the behaviour. Currently the behaviour is undefined hence risky.
#4 : 05/07-25 13:10
Delta Foxtrot
Posts: 521
Reply to #3:

No, you posted on the forum which is where users try to help other users. Contact Kim at the "Support" link above.
#5 : 05/07-25 13:25
Chris
Posts: 38
Reply to #4:

Thanks. I see nothing suggesting Devs don't read this forum. I will do as you suggest.
#6 : 05/07-25 20:56
Kim Jensen
Administrator
Posts: 1002
Reply to #1:
You can test it out like this:
app.log(app.parseTags(''));
The result is an empty string

If you give it an invalid tag, the result is still an empty string:
app.log(app.parseTags('<sdlck>'));

If you give it no value at all, the result will be undefined
app.log(app.parseTags());
#7 : 06/07-25 19:42
Chris
Posts: 38
Reply to #6:

Thanks. But:

If you give it an invalid tag, the result is still an empty string:
app.log(app.parseTags('<sdlck>'));

is undefined behaviour. My suggestion is that this remedied by the User Guide.

Sorry to have been insufficiently clear.
#8 : 06/07-25 19:47
Kim Jensen
Administrator
Posts: 1002
Reply to #7:
I don't know what else it should do besides returning an empty string. It is the only logical result in my opinion. It works exactly the same as the New Name method.
#9 : 06/07-25 23:15
Chris
Posts: 38
Reply to #8:

Returning an empty string is fine.

All that's needed is the User Guide make this defined behaviour. Then scripts will be able to rely on it.