Ignore quotes in Mattermost new issue command
Description
When entering the /<trigger> issue new
command in Mattermost, there have been some cases of people using quotes to separate the issue title
and description
arguments. This behavior can be rooted in the usual procedure of using double quotes to prevent word splitting. Usually, an argument enclosed in double quotes presents itself as a single word, even if it contains whitespace.
This causes the issue title and description to be enclosed in quotes, something that may not be desired.
Proposal
Detect the use of quotes (single '
and double "
) and ignore them when creating the issue. However, they should only be ignored if the whole title or description is enclosed. Examples:
/<trigger> issue new "these words should have no quotes" \n "nor these"
should create an issue as:
- Title: these words should have no quotes
- Description: nor these
/<trigger> issue new "these words" should stay quoted \n and the same should happen to "these words"
should create an issue as:
- Title: "these words" should stay quoted
- Description: and the same should happen to "these words"