Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 110121 Details for
Bug 244017
Hyperlinking support for Trac should handle disabled (escaped) links.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
new patch that obsoletes the older one
trac-escape-wikilink.patch (text/plain), 3.62 KB, created by
David Green
on 2008-08-15 14:57:45 EDT
(
hide
)
Description:
new patch that obsoletes the older one
Filename:
MIME Type:
Creator:
David Green
Created:
2008-08-15 14:57:45 EDT
Size:
3.62 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.trac.tests >Index: src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java >diff -N src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtilTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,61 @@ >+/******************************************************************************* >+ * Copyright (c) 2004, 2007 Mylyn project committers and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.trac.ui; >+ >+import java.util.regex.Matcher; >+ >+import junit.framework.TestCase; >+ >+/** >+ * >+ * @author David Green >+ */ >+public class TracHyperlinkUtilTest extends TestCase { >+ public void testWikiPattern2SinglePositiveMatch() { >+ Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("a HyperLink there"); >+ assertTrue(matcher.find()); >+ assertEquals(matcher.group(0), "HyperLink"); >+ assertFalse(matcher.find()); >+ } >+ >+ public void testWikiPattern2MultiplePositiveMatch() { >+ Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("a HyperLink there and ThereIsAnother"); >+ assertTrue(matcher.find()); >+ assertEquals(matcher.group(0), "HyperLink"); >+ assertTrue(matcher.find()); >+ assertEquals(matcher.group(0), "ThereIsAnother"); >+ assertFalse(matcher.find()); >+ } >+ >+ public void testWikiPattern2SingleNegativeMatch() { >+ Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("no !HyperLink there"); >+ assertFalse(matcher.find()); >+ } >+ >+ public void testWikiPattern2SinglePositiveMatchAtStartOfLine() { >+ Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("HyperLink there"); >+ assertTrue(matcher.find()); >+ assertEquals(matcher.group(0), "HyperLink"); >+ assertFalse(matcher.find()); >+ } >+ >+ public void testWikiPattern2SingleNegativeMatchAtStartOfLine() { >+ Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("!HyperLink there"); >+ assertFalse(matcher.find()); >+ } >+ >+ public void testWikiPattern2MixedPositiveNegativeMatch() { >+ Matcher matcher = TracHyperlinkUtil.wikiPattern2.matcher("a HyperLink there and ThereIsAnother but !NotHere"); >+ assertTrue(matcher.find()); >+ assertEquals(matcher.group(0), "HyperLink"); >+ assertTrue(matcher.find()); >+ assertEquals(matcher.group(0), "ThereIsAnother"); >+ assertFalse(matcher.find()); >+ } >+} >#P org.eclipse.mylyn.trac.ui >Index: src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java,v >retrieving revision 1.17 >diff -u -r1.17 TracHyperlinkUtil.java >--- src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java 15 Aug 2008 18:33:04 -0000 1.17 >+++ src/org/eclipse/mylyn/internal/trac/ui/TracHyperlinkUtil.java 15 Aug 2008 18:55:31 -0000 >@@ -56,7 +56,7 @@ > > static Pattern wikiPattern1 = Pattern.compile("wiki:(\\w+)"); > >- static Pattern wikiPattern2 = Pattern.compile("(?<![!])[A-Z][a-z0-9]+[A-Z]\\w*"); >+ static Pattern wikiPattern2 = Pattern.compile("((?<!\\!)|^)[A-Z][a-z0-9]+[A-Z]\\w*"); > > static Pattern milestonePattern = Pattern.compile("milestone:([\\w\\.]+)"); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244017
:
109954
|
110097
|
110098
|
110120
| 110121