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
This commit is contained in:
Dmitriy Zaporozhets
2015-03-02 22:51:42 +00:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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.
+1 -1
View File
@@ -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{