Skip to content

Commit

Permalink
[Perl] Optimise error handling for unclosed DocStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
obligaron committed Feb 1, 2025
1 parent cc336fe commit 662e39a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
### Fixed
- [.NET] Fix NuGet package generation
- [c] Optimise error handling for empty datatable rows
- [Perl] Optimise error handling for unclosed DocStrings

## [31.0.0] - 2025-01-29
### Added
Expand Down
3 changes: 3 additions & 0 deletions perl/lib/Gherkin/TokenMatcher.pm
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ sub match_StepLine {

sub match_DocStringSeparator {
my ( $self, $token ) = @_;
if ($token->is_eof) {
return 0;
}
if ( !$self->_active_doc_string_separator ) {
return $self->_match_DocStringSeparator( $token, '"""', 1 )
|| $self->_match_DocStringSeparator( $token, '```', 1 );
Expand Down

0 comments on commit 662e39a

Please sign in to comment.