Skip to content

Commit

Permalink
fix: URLs with more than 1 colon gets split before colon (#1398)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinshine committed May 30, 2023
1 parent a75f2bd commit 41d53c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ public void process(Delimiter opener, Delimiter closer, int delimitersUsed) {
public boolean canBeOpener(String before, String after, boolean leftFlanking, boolean rightFlanking,
boolean beforeIsPunctuation, boolean afterIsPunctuation, boolean beforeIsWhitespace,
boolean afterIsWhiteSpace) {
return leftFlanking;
return leftFlanking && (beforeIsPunctuation || beforeIsWhitespace);
}

@Override
public boolean canBeCloser(String before, String after, boolean leftFlanking, boolean rightFlanking,
boolean beforeIsPunctuation, boolean afterIsPunctuation, boolean beforeIsWhitespace,
boolean afterIsWhiteSpace) {
return rightFlanking;
return rightFlanking && (afterIsPunctuation || afterIsWhiteSpace);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ public class EmojiExtension implements Parser.ParserExtension, HtmlRenderer.Html

@Override
public void rendererOptions(final MutableDataHolder options) {

}

@Override
public void parserOptions(final MutableDataHolder options) {

}

@Override
Expand Down

0 comments on commit 41d53c8

Please sign in to comment.