Fix description length validation and tag limiting #348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: This contains the stuff from #305, since I don't want to put work into fixing conflicts twice from first cherry-picking it out and then rebasing it again later. Either merge that other PR first or do only this one. Look at the individual commits to get a clean diff.Resolved.The validation functions would get passed the raw description as entered by the user and would make some half-hearted effort to parse them into something sensible, but this completely breaks down in the face of shortcuts like {default}, username shortcuts that get turned into long links etc. Now those functions get the actually parsed description passed to them, the only unresolved shortcut in them being the
{tags}
one, since the length of that is variable and up to the validation function to deal with and tell the user if tags didn't fit.Since #286, tags insertion is also pretty much busted entirely, since it runs at the wrong time, so it may insert too many tags and then cause an error down the line because the resulting description is too long. That insertion logic has now been moved to the end of the description processing, where it belongs.