Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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