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 Jan 15, 2025
1 parent e57d6e0 commit bc7a7b2
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 @@ -18,6 +18,7 @@ This document is formatted according to the principles of [Keep A CHANGELOG](htt
- [.NET] Use string-ordinal comparison consistently and remove old Mono workaround
- [.NET] Improved startup time
- [c] Optimise error handling for empty datatable rows
- [Perl] Optimise error handling for unclosed DocStrings

### Changed
- [cpp] add generic support for ABI versioning with VERSION ([#328](https://github.com/cucumber/gherkin/pull/328))
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;
}
if ( !$self->_active_doc_string_separator ) {
return $self->_match_DocStringSeparator( $token, '"""', 1 )
|| $self->_match_DocStringSeparator( $token, '```', 1 );
Expand Down

0 comments on commit bc7a7b2

Please sign in to comment.