Modify ↓
Opened 8 years ago
Closed 8 years ago
#12938 closed defect (fixed)
Completion doesn't work on `wiki:` link with digits, minus, dot and unicode characters
Reported by: | Jun Omae | Owned by: | Peter Suter |
---|---|---|---|
Priority: | normal | Component: | WikiAutoCompletePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
I think we should use \S*
pattern rather than [\w/]*
.
diff --git a/wikiautocomplete/htdocs/js/wikiautocomplete.js b/wikiautocomplete/htdocs/js/wikiautocomplete.js index dac2c4c..e68f894 100644 --- a/wikiautocomplete/htdocs/js/wikiautocomplete.js +++ b/wikiautocomplete/htdocs/js/wikiautocomplete.js @@ -54,7 +54,7 @@ jQuery(document).ready(function($) { }, { // Wiki pages - match: /\bwiki:([\w/]*)$/, + match: /\bwiki:(\S*)$/, search: function (term, callback) { $.getJSON(wikiautocomplete.url + '/wikipage', { q: term }) .done(function (resp) { callback(resp); })
Attachments (0)
Change History (4)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
From comment:2:ticket:12928:
Also, I use
-
character in repository name. In this case, completion doesn't work.
wikiautocomplete/htdocs/js/wikiautocomplete.js
diff --git a/wikiautocomplete/htdocs/js/wikiautocomplete.js b/wikiautocomplete/htdocs/js/wikiautocomplete.js index 2b14015..bcb282a 100644
a b jQuery(document).ready(function($) { 63 63 }, 64 64 65 65 { // Source 66 match: /\b(source:|log:)([ \w/.]*(?:@\w*)?)$/,66 match: /\b(source:|log:)([^@\s]*(?:@\S*)?)$/, 67 67 search: function (term, callback) { 68 68 $.getJSON(wikiautocomplete_url + '/source', { q: term }) 69 69 .done(function (resp) { callback(resp); })
comment:4 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Sounds good to me!