Fix minor typos and potential errors

This commit is contained in:
agnostic-apollo
2021-06-26 08:51:30 +05:00
parent 4494bc66e4
commit 28f81f2cc7
2 changed files with 6 additions and 4 deletions

View File

@@ -90,10 +90,12 @@ public class MarkdownUtils {
int maxCount = 0;
int matchCount;
String match;
Matcher matcher = backticksPattern.matcher(string);
while(matcher.find()) {
matchCount = matcher.group(1).length();
match = matcher.group(1);
matchCount = match != null ? match.length() : 0;
if (matchCount > maxCount)
maxCount = matchCount;
}