Skip to content

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

Open
@jebarpg

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*)\)?)?$")),

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