imjoshdean / mascot-bot

Beatz Bot is BronyCon's Slack assistant, at your service!
MIT License
5 stars 3 forks source link

Fixed fake--em--dashes #48

Closed Grissess closed 7 years ago

Grissess commented 7 years ago

Tested briefly in a web browser, but beyond that not tested in practice; some verification would be nice, but it seems to work :)

The major fix is the (?:\s+|$) group after the ++ or ----the meaning of which is that "an operator must be followed by at least one whitespace character, or by the end of the message". It absorbed a previous "\s?" group used to separate the comment character (// or #) out. In practice, that means the following are legal:

...the following, however, are not:

Suggestions welcome! :D

imjoshdean commented 7 years ago

Looks good! Thanks for the addition 👍