hipchat/hubot-hipchat — pull request #209 by chrismar035 (2014-10-29 20:40:34+00:00)
Title: Transform colon style emoticons to parentheses

I've noticed some plugins/scripts using the colon style syntax for emoticons and I thought the HipChat adapter should convert them. No one should ever be without emoticons. :)

Namely, `hubot-pager-me`:

![hipchat](https://cloud.githubusercontent.com/assets/75132/4833549/9bec3836-5fa5-11e4-9573-705eb7831c25.png)

`:boom: => (boom)`

```
> b = ":boom:"
':boom:'
> b.replace(/:(\w+):/g, "($1)")
'(boom)'
> b = "This: thing works :boom:"
'This: thing works :boom:'
> b.replace(/:(\w+):/g, "($1)")
'This: thing works (boom)'
> b = "This: :indeed: thing works :boom:"
'This: :indeed: thing works :boom:'
> b.replace(/:(\w+):/g, "($1)")
'This: (indeed) thing works (boom)'
> b = "This: :indeed: :work corr: ectly :boom:"
'This: :indeed: :work corr: ectly :boom:'
> b.replace(/:(\w+):/g, "($1)")
'This: (indeed) :work corr: ectly (boom)'
```