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 @@ -408,6 +408,7 @@ public void visit(RefLinkNode refLinkNode) {
String url = getRefLinkUrl(refLinkNode.referenceKey, linkName);
// FIXME how to handle url, if linkName include period character?
// TODO temporary implementation
if (candidateSentences.size() == 0) { return; }
CandidateSentence lastCandidateSentence =
candidateSentences.get(candidateSentences.size() - 1);
if (StringUtils.isNotEmpty(url)) {
Expand Down
14 changes: 14 additions & 0 deletions redpen-core/src/test/java/cc/redpen/MarkdownParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,20 @@ void testThreeSuccuessiveImageNestedLinkWithJaConf() throws Exception {
}
}

@Test
void testReferenceLink() throws Exception {
String sampleText =
"[![foo](foo)][bar]\n\n" +
"[bar]: bar\n";
Configuration conf = Configuration.builder("ja").build();
try {
createFileContent(sampleText, conf);
} catch (Exception e) {
fail("Exception is not expected.");
}
}


@Test
void testNotExtractNoLabelImage() throws Exception {
String sampleText = "![](https://aimless.jp/blog/images/2016-09-07-001.png)\n";
Expand Down