Skip to content

Exclamation mark breaks quote parsing #22

@AlexBlack772

Description

@AlexBlack772
    $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" }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions