Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclamation mark breaks quote parsing #22

Open
AlexBlack772 opened this issue Aug 14, 2022 · 0 comments
Open

Exclamation mark breaks quote parsing #22

AlexBlack772 opened this issue Aug 14, 2022 · 0 comments

Comments

@AlexBlack772
Copy link

    $text	= "'Quoted text!'.\nAnother line";

    // Create a new instance
    $Sentence	= new \Vanderlee\Sentence\Sentence();

    // Split into array of sentences
    $sentences	= $Sentence->split($text);

    var_dump($sentences);

End of the quote and dot incorrectly parsed to a separate sentence. Sentence without exclamation mark is parsed correctly

array(3) { [0]=> string(13) "'Quoted text!" [1]=> string(3) "'. " [2]=> string(12) "Another line" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant