Skip to content

Commit

Permalink
import all the things and fix dumb comment bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Alison Kao committed Nov 20, 2013
1 parent 035f0af commit 72d2774
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/wikigraph/wikidump/LinkParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import java.util.List;
import java.util.HashSet;
import java.util.ArrayList;

/**
* Parses out the links from the markup. Tries to only get the links in the body of the article.
Expand Down Expand Up @@ -33,7 +34,9 @@ public List<String> getConnections(String markup) {
int endComment = markup.indexOf(COMMENT_END, currentIndex);
int frontIndex = markup.indexOf(LINK_FRONT, currentIndex);

if (frontIndex > frontComment && frontComment != -1) {
if (frontIndex > frontComment &&
(frontIndex < endComment || endComment == -1) &&
frontComment != -1) {
if (endComment != -1) {
currentIndex = endComment;
continue;
Expand Down

0 comments on commit 72d2774

Please sign in to comment.