Skip to content

HUBOT_MARKOV_RESPOND_CHANCE env var cannot contain '.' #25

@bnfinet

Description

@bnfinet

we've set the env var HUBOT_MARKOV_RESPOND_CHANCE to 0.005 for very infrequent but very humorous responses.

Unfortunately this line...
https://github.com/smashwilson/hubot-markov/blob/master/src/config.coffee#L6
tests for digits and fails on '.'

can I suggest
/^[-+]?[0-9]*\.?[0-9]+$/.test

Thanks for helping us to brighten our days with markov enabled hubot!

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