#1269: Search an expression with CamelCase does not work
-------------------------------------+--------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: cboos
Type: defect | Status: assigned
Priority: normal | Milestone: 0.10
Component: search system | Version: 0.8.1
Severity: minor | Resolution:
Keywords: search CamelCase |
-------------------------------------+--------------------------------------
Changes (by cboos):
* status: new => assigned
* severity: normal => minor
* owner: jonas => cboos
* milestone: => 0.10
Comment:
So what about doing the quick jump only if the page exist?
{{{
#!diff
Index: trac/Search.py
===================================================================
--- trac/Search.py (revision 3013)
+++ trac/Search.py (working copy)
@@ -22,7 +22,7 @@
from trac.util import TracError, escape, format_datetime, Markup
from trac.web import IRequestHandler
from trac.web.chrome import add_link, add_stylesheet,
INavigationContributor
-from trac.wiki import IWikiSyntaxProvider
+from trac.wiki import WikiSystem, IWikiSyntaxProvider
class ISearchSource(Interface):
@@ -253,7 +253,8 @@
elif len(kwd) > 1 and kwd[0].isupper() and kwd[1].islower():
r = "((^|(?<=[^A-Za-z]))[!]?[A-Z][a-z/]+(?:[A-Z][a-z/]+)+)"
if re.match (r, kwd):
- return self.env.href.wiki(kwd)
+ if WikiSystem(self.env).has_page(kwd):
+ return self.env.href.wiki(kwd)
# IWikiSyntaxProvider methods
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/1269>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets