I recently ran into an issue that when passing arguments (like text, title or subtitle) that start with a "-", no notification would be displayed. I traced this bug down to NSUserDefaults, which doesn't like arguments like -title "-xyz" apparently. This PR implements a hack to get around this by inserting a space before such arguments (-title "-xyz" becomes -title " -xyz"). MacOS removes whitespace, so notifications are shown correctly (without the space) in the notification center.
First of all, thank you for this amazing gem!
I recently ran into an issue that when passing arguments (like text, title or subtitle) that start with a "-", no notification would be displayed. I traced this bug down to NSUserDefaults, which doesn't like arguments like
-title "-xyz"
apparently. This PR implements a hack to get around this by inserting a space before such arguments (-title "-xyz"
becomes-title " -xyz"
). MacOS removes whitespace, so notifications are shown correctly (without the space) in the notification center.