Skip to content

Conversation

@eush77
Copy link
Contributor

@eush77 eush77 commented Jun 5, 2017

This PR replaces String.prototype.replace with the combination of String.prototype.split and Array.prototype.join to work around patterns such as $& or $$ or $' that are interpreted by String.prototype.replace, leading for example to this:

$ github-markdown-preview <(echo '$&') | tail -3
<article class="markdown-body"><p>{{markdown}}amp;</p>
</article>

This commit replaces the usage of `String.prototype.replace` since it
requires escaping against interpreted patterns such as `$&` or `$$`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant