Skip to content

Fixing @gitmoji/parser-opts to allow for - and / #674

Description

@jebarpg

I use types in the form of fix-ci and ci/cd, which doesn't get picked up by the regex \w* due to the - and / in-between the words
I propose changing (?\w*) to (?[a-zA-z-,/]+) on this line:
https://github.com/arvinxx/gitmoji-commit-workflow/blob/master/packages/parser-opts/src/index.ts#L10

so it becomes this

headerPattern: new RegExp("^(?:".concat(gitmojiCodeStr, "|(?:").concat(gitmojiUnicodeStr, ")|(?:").concat(emojiStr, "))\s(?[a-zA-z-,/]+)(?:\((?.)\))?!?:\s(?(?:(?!#).)(?:(?!\s).))(?:\s\(?(?#\d*)\)?)?$")),

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions