gjtorikian/roaster — pull request #15 by izuzak (2014-05-20 19:19:57+00:00)
Title: Fix rendering of multiple emoji in code blocks

Fixes https://github.com/atom/markdown-preview/issues/84

This modifies the loop which replaces emojis in code blocks so that only the element that should be changed (`this`) is selected.

Before (notice the duplicates in the preview window):

![screen shot 2014-05-20 at 9 18 16 pm](https://cloud.githubusercontent.com/assets/38924/3032082/89a5a59e-e053-11e3-95e7-c4274cb5d7e4.png)

Failing test:

```
roaster
emoji
it does not mess up coded emoji
Expected '

not :trollface:

wow that is nice :smiley:

:smiley:

:smiley:

:trollface:

:trollface:

' to equal '

not :trollface:

wow that is nice :smiley:

:laughing:

:lipstick:

:laughing:

:lipstick:

'. (test/roaster-spec.coffee:126:35)
```

After (no duplicates!):

![screen shot 2014-05-19 at 9 09 53 pm](https://cloud.githubusercontent.com/assets/38924/3032012/dee3435a-e052-11e3-8e9c-e35031841bd2.png)

cc @gjtorikian