Possible unwanted whitespace removal in tidbits
A meme currently going around the fanbase of a certain anime franchise proved impossible to replicate faithfully in a Bucket response. Observe the following:
<dgw> Kaede: it's joke <reply> I T S J O K E
<Kaede> dgw taught in #Kaede (#4886): 'it's joke', '<reply>', 'I T S J O K E'
The extra whitespace is part of the meme, but is removed before the tidbit is saved.
I think it's because of sub irc_on_public performing the following replacement before processing an incoming line:
$msg =~ s/\s\s+/ /g;
Is there a downside to moving this substitution later in the chain of processing, so teaching operations can learn tidbits verbatim (using &decommify or similar to clean the fact part)? Or is it actually caused somewhere else?
Maybe.
You'd have to still keep it for the trigger part, but removing it from the tidbit should be fine.
On the other hand, other operations (like s/// or other matching) will never be able to match the tidbit, because they'd have their spaces collapsed too.
I suppose the "proper" solution would be to implement quoting, so that bucket would only despace unquoted bits.