Show warning when creating wiki pages with known format extensions
Problem to solve
When creating wiki pages, the user enters the title and the format extension (e.g. .md
) will be automatically added to the file in the repository.
This means that if you include the extension in the title, you end up with a duplicated extension in the filename (e.g. a title of page.md
results in a file page.md.md
). This behaviour is confusing, but might be desired in some cases.
Proposal
Show a form warning if the title ends with a known format extension, but allow the user to ignore the warning.
Further details
Documentation
No documentation needed.
Availability & Testing
What does success look like, and how can we measure that?
What is the type of buyer?
Is this a cross-stage feature?
Links / references
The known format extensions are defined in Wiki::MARKUPS
: https://gitlab.com/gitlab-org/gitlab/-/blob/7292be58e732967b1145bd0767cf0d9ee30fb57c/app/models/wiki.rb#L8-13
Follow-up from #17845 (comment 359454521)