Commit 229eb732 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'project-refs-with-digit-prefix' into 'master'

Support referencing issues to a project whose name starts with a digit

Gitlab supports adding users or projects whose name starts with a "_" or a digit, but the regexp in markdown.rb enforces "a-zA-Z" for the first character.

This change allows to reference issues or merge requests in other projects whose name starts with a digit, like `owner/2ndtestproject#123` or `2nduser/superproject!123`.

See merge request !264
parents c530ca00 8d0690c5
......@@ -23,6 +23,7 @@ v 7.8.1
- Fix urls for the issues when relative url was enabled
- Add Bitbucket omniauth provider.
- Add Bitbucket importer.
- Support referencing issues to a project whose name starts with a digit
v 7.8.0
- Fix access control and protection against XSS for note attachments and other uploads.
......
......@@ -121,7 +121,7 @@ module Gitlab
text
end
NAME_STR = '[a-zA-Z][a-zA-Z0-9_\-\.]*'
NAME_STR = '[a-zA-Z0-9_][a-zA-Z0-9_\-\.]*'
PROJ_STR = "(?<project>#{NAME_STR}/#{NAME_STR})"
REFERENCE_PATTERN = %r{
......
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