From: Shane Synan Date: Tue, 28 Jun 2016 02:33:35 +0000 (-0400) Subject: Add brackets to timestamp when copying if hidden X-Git-Tag: travis-deploy-test~438 X-Git-Url: https://git.quassel-irc.org/?a=commitdiff_plain;h=faa66f7e00aeeea661b46f01bdfc715567eef669;hp=faa66f7e00aeeea661b46f01bdfc715567eef669;p=quassel.git Add brackets to timestamp when copying if hidden Add brackets around timestamp if ShowSenderBrackets is disabled -and- the timestamp format does not contain brackets. This matches all common types of brackets using a regular expression. Remove any leading and trailing space from timestamp format before copying if above conditions met, to avoid having [ 11:04:32] or some such. This might be unexpected, but if someone has specific needs for the bracket arrangement, they can toggle to always show sender brackets. Examples with show sender brackets disabled: " hh:mm:ss" -> "[hh:mm:ss]" " h:mm:ss ap" -> "[h:mm:ss ap]" " "[ unchanged "" -> unchanged "{hh:mm:ss:ss>" -> unchanged (and I won't ask why you're doing this) For regular expression debugging and explanations, See: https://regex101.com/ ---