Skip to content

Windows \r\n line endings are not supported #26

@mortenscheel

Description

@mortenscheel

The InputStream reads a single byte at a time, and it considers \r to be a regular token.
When Parser::detectSymbols() encounters a \r token, it throws a "invalid character" exception.

The simplest fix would be to normalize line endings before to normalize whitespace before tokenizing, like

$term = preg_replace('/\s+/', ' ', $term);

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