summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-11-12 11:00:16 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-11-12 11:00:16 +0000
commit90432cbbe17753182cb2e81e01dd0b3de66e6152 (patch)
tree0067cbaa98d735ad1a1652284547812d74394497 /public/javascripts
parentb30c77453fb2ae2d0a7279d38c000c6249802910 (diff)
downloadredmine-90432cbbe17753182cb2e81e01dd0b3de66e6152.tar.gz
redmine-90432cbbe17753182cb2e81e01dd0b3de66e6152.zip
Merged r22419 from trunk to 5.1-stable (#38852).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22424 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/application.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index a183a2777..d39475d46 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1172,7 +1172,12 @@ function inlineAutoComplete(element) {
fillAttr: 'label',
requireLeadingSpace: true,
selectTemplate: function (issue) {
- return '#' + issue.original.id;
+ let leadingHash = "#"
+ // keep ## syntax which is a valid issue syntax to show issue with title.
+ if (this.currentMentionTextSnapshot.charAt(0) === "#") {
+ leadingHash = "##"
+ }
+ return leadingHash + issue.original.id;
},
menuItemTemplate: function (issue) {
return sanitizeHTML(issue.original.label);