Skip to content

PartialTagParser exhaustion side effect?! #137

Open
@ProIcons

Description

@ProIcons

if (slice.IsEmpty)
{
return false;
}

This should throw an exception instead of returning false. At this point there's nothing in the Slice, and the parser is moving to the next InlineParser -> InterpolationTagParser
which fails on

With IndexOutOfBounds Exception. While this indeed throws an exception, it doesn't throw it on the correct place.

If the intention is to support Parsers before the InterpolationTagParser with the ParserPipeline, then in that, if condition, the slice's start position should be reverted to its original, before returning false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions