Skip to content

Snippets: can't use multiple names for a snippet #26

@TiZ-HugLife

Description

@TiZ-HugLife

The regex is messed up:

for snipName in line:gmatch("%s(.+)") do -- %s space .+ one or more non-empty sequence

%s(.+) is matched greedily, which means that everything after snippet becomes part of the name; you end up with a snippet that has spaces in its name. Instead, you want %s(%S+) so that you split up spaces and non-spaces.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions