Skip to content

Commit

Permalink
Merge pull request #81 from nieldw/fix/parse_very_long_text_blocks
Browse files Browse the repository at this point in the history
Fix StackOverflowError in long Text Block by using non-capturing Atomic Group
  • Loading branch information
qoomon committed Nov 16, 2020
2 parents ad82770 + 80b49db commit 3df6a82
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TextBlock implements SwiftBlock {

public static final String BLOCK_ID_4 = "4";

public static final Pattern FIELD_PATTERN = Pattern.compile("([^\\n]+)?\\n((:?.*\\n)*-)");
public static final Pattern FIELD_PATTERN = Pattern.compile("([^\\n]+)?\\n((?>:?.*\\n)*-)");

private final Optional<String> infoLine;

Expand Down

0 comments on commit 3df6a82

Please sign in to comment.