Skip to content

Incorrect line for type when looking up the typeIndex, when type is a substring #255

Description

@d-jeffery

Problem: incorrect type index return for asset when asset-category is given precedence in declaration.

Example:
image

image

Fix: update each method to do a full string match, not a prefix match.

.findIndex((line: string) => line.trim().startsWith(`${extension ? "extend " : ""}type ${typeName}`)) + skipIndex

return strings.HasPrefix(strings.TrimSpace(line), "type "+typeName)

return findLine(line -> line.trim().startsWith("type " + typeName), skipIndex);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions