Fix MR draft RegEx

This fixes a RegEx that checks whether an MR is a draft in the MR
edit/create page. The RegEx was recently changed in a way that prevents
it from detecting the current MR state and breaks the toggle draft
status feature.
parent d5142d6a
......@@ -53,7 +53,7 @@ export default class IssuableForm {
// prettier-ignore
this.draftRegex = new RegExp(
'^\\s*(' + // Line start, then any amount of leading whitespace
'|\\[draft\\]\\s*' + // [Draft] and any following whitespace
'\\[draft\\]\\s*' + // [Draft] and any following whitespace
'|draft:\\s*' + // Draft: and any following whitespace
'|\\(draft\\)\\s*' + // (Draft) and any following whitespace
')+' + // At least one repeated match of the preceding parenthetical
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment