| Chunk |
|---|
| Conflicting content |
|---|
"0-9]+)?(?:/(?:([\\w=?:+/\\[\\]~&%;,._#-]|(\\([^\\)]*\\)))*([\\w=?+/~&%-]|(\\([^\\)]*\\))))" +
"?)?)|(?:mailto: ?[a-z0-9+]+@[a-z0-9.-]+.[a-z]+)", RE.REG_ICASE);*/
//fix #73: allow only & entity in url "[\\w$-_.+!*'(),\\u0999]+"
<<<<<<< HEAD
urlRE = Pattern.compile(URL_PATTTERN,
=======
urlRE = Pattern.compile("(?:(?:(?:(?:https?://)|(?:ftp://)|(?:www\\.))|(?:ftp\\.))[a-z0-9.-]+(?:\\.[a-z]+)?(?::[0-9]+)?" +
"(?:/(?:([\\w=?+/\\[\\]~%;,._@\\#'\\p{L}:-]|(\\([^\\)]*\\)))*([\\p{L}:'" +
"\\w=?+/~@%-]|(?:&(?=amp;)[\\w:$_.+!*'#%(),@\\p{L}=;-]+)+|(\\([^\\)]*\\))))?)?)" +
"|(?:mailto: ?[a-z0-9+]+@[a-z0-9.-]+.[a-z]+)",
>>>>>>> 9170a3528ec3c4b180abb2f1bdcfb00569724057
Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
} catch (PatternSyntaxException e) {
throw new RuntimeException(e); |
| Solution content |
|---|
"0-9]+)?(?:/(?:([\\w=?:+/\\[\\]~&%;,._#-]|(\\([^\\)]*\\)))*([\\w=?+/~&%-]|(\\([^\\)]*\\))))" +
"?)?)|(?:mailto: ?[a-z0-9+]+@[a-z0-9.-]+.[a-z]+)", RE.REG_ICASE);*/
//fix #73: allow only & entity in url "[\\w$-_.+!*'(),\\u0999]+"
urlRE = Pattern.compile(URL_PATTTERN,
Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
} catch (PatternSyntaxException e) {
throw new RuntimeException(e); |
| File |
|---|
| HTMLFormatter.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
private static final String Latin1Supplement = "http://de.wikipedia.org/wiki/Großes_ß#Unicode";
private static final String greek = "http://el.wikipedia.org/wiki/άλλες";
private static final String QP = "http://www.ozon.ru/?context=search&text=%D8%E8%EB%E4%F2";
<<<<<<< HEAD
private static final String EMPTY_ANCHOR = "http://www.google.com/#";
private static final String SLASH_AFTER_AMP = "http://extensions.joomla.org/extensions/communities-&-groupware/ratings-&-reviews/5483/details";
=======
>>>>>>> 9170a3528ec3c4b180abb2f1bdcfb00569724057
@Test
public void testURLHighlight() throws UtilException { |
| Solution content |
|---|
private static final String Latin1Supplement = "http://de.wikipedia.org/wiki/Großes_ß#Unicode";
private static final String greek = "http://el.wikipedia.org/wiki/άλλες";
private static final String QP = "http://www.ozon.ru/?context=search&text=%D8%E8%EB%E4%F2";
private static final String EMPTY_ANCHOR = "http://www.google.com/#";
private static final String SLASH_AFTER_AMP = "http://extensions.joomla.org/extensions/communities-&-groupware/ratings-&-reviews/5483/details";
@Test
public void testURLHighlight() throws UtilException { |
| File |
|---|
| HTMLFormatterTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
assertTrue("All text should be inside link", s2.endsWith(""));
}
<<<<<<< HEAD
public void testSlashAfterAmp(){
@Test
public void testEmptyAnchor(){
HTMLFormatter formatter = new HTMLFormatter(EMPTY_ANCHOR);
formatter.enableUrlHighLightMode();
String s2 = formatter.process();
assertTrue("All text should be inside link", s2.endsWith(""));
}
@Test
HTMLFormatter formatter = new HTMLFormatter(SLASH_AFTER_AMP);
formatter.enableUrlHighLightMode();
String s2 = formatter.process();
assertTrue("All text should be inside link", s2.endsWith(""));
int blankIndex = s2.indexOf(" ");
int lastIndex = s2.lastIndexOf(" ");
assertThat("No whitespace inside link", blankIndex, CoreMatchers.equalTo(lastIndex));
//whitespace shoud separate href attribute. no other ws should occur
}
=======
>>>>>>> 9170a3528ec3c4b180abb2f1bdcfb00569724057
} |
| Solution content |
|---|
assertTrue("All text should be inside link", s2.endsWith(""));
}
@Test
public void testEmptyAnchor(){
HTMLFormatter formatter = new HTMLFormatter(EMPTY_ANCHOR);
formatter.enableUrlHighLightMode();
String s2 = formatter.process();
assertTrue("All text should be inside link", s2.endsWith(""));
}
@Test
public void testSlashAfterAmp(){
HTMLFormatter formatter = new HTMLFormatter(SLASH_AFTER_AMP);
formatter.enableUrlHighLightMode();
String s2 = formatter.process();
assertTrue("All text should be inside link", s2.endsWith(""));
int blankIndex = s2.indexOf(" ");
int lastIndex = s2.lastIndexOf(" ");
assertThat("No whitespace inside link", blankIndex, CoreMatchers.equalTo(lastIndex));
//whitespace shoud separate href attribute. no other ws should occur
}
} |
| File |
|---|
| HTMLFormatterTest.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Method declaration |