Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,8 @@ private int handleSpecialCharacterRuns(Paragraph p, int index, boolean skipStyli
url = text.substring(start, end);
}

xhtml.startElement("a", "href", url);
closeStyleElements(skipStyling, xhtml);
xhtml.startElement("a", "href", url);
for (CharacterRun cr : texts) {
handleCharacterRun(cr, skipStyling, xhtml);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,15 @@ public void testBoldHyperlink() throws Exception {
assertContains("<a href=\"http://tika.apache.org/\"><b><u>hyper</u></b><u> link</u></a>; bold" , xml);
}

@Test
public void testHyperlinkSurroundedByItalics() throws Exception {
//TIKA-2599
String xml = getXML("testWORD_italicsSurroundingHyperlink.doc").xml;
xml = xml.replaceAll("\\s+", " ");
assertContains("<body><p><i>Italic Test before link </i><a href=\"http://www.google.com\"><b><i>" +
"<u>hyperlink italics</u></i></b></a><i> Italic text after hyperlink</i></p>", xml);
}

@Test
public void testMacros() throws Exception {

Expand Down
Binary file not shown.