Skip to content

Commit

Permalink
filter markdown inner link when fix markdown links
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirtyDegreesRay committed Dec 26, 2017
1 parent b4eb857 commit 8da9319
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ private static String fixLinks(@NonNull String source, @NonNull String baseUrl)
Matcher linksMatcher = LINK_PATTERN.matcher(source);
while (linksMatcher.find()) {
String oriUrl = linksMatcher.group(1);
if (oriUrl.contains("http://") || oriUrl.contains("https://")) {
if (oriUrl.contains("http://") || oriUrl.contains("https://")
|| oriUrl.startsWith("#") //filter markdown inner link
) {
continue;
}

Expand Down

0 comments on commit 8da9319

Please sign in to comment.