# Preview not working with Edge

**URL:** <https://meta.discourse.org/t/preview-not-working-with-edge/116226>\
**Category:** Bug\
**Created:** [April 29, 2019, 9:34am UTC](https://meta.discourse.org/t/preview-not-working-with-edge/116226 "2019-04-29T09:34:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)\
**Post date:** [April 29, 2019, 2:47pm UTC](https://meta.discourse.org/t/preview-not-working-with-edge/116226/4 "2019-04-29T14:47:05Z")

</div>

Ok this was kind of tricky to find the root cause, thanks to stellar debugging tools from edge.

So it happens edge has stellar Regexp support (a pattern is emerging) and will result in this:

Edge:

 ![16](https://global.discourse-cdn.com/meta/original/3X/2/d/2d91242e8e0a58099d0f506a23732561a23b0cb2.png)

Chrome:

 ![33](https://global.discourse-cdn.com/meta/original/3X/9/5/95cf287c40d7aad2b2e71903f22c8459ee7ec909.png)

Making this line of Discourse fail [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/engines/discourse-markdown/text-post-process.js.es6#L24](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/engines/discourse-markdown/text-post-process.js.es6#L24) spectacularly.

I was about to write a fix for this case, but @zogstrip found a polyfill, which is probably way better as it will prevent this from happening in any other place in the app.

[https://github.com/discourse/discourse/pull/7460](https://github.com/discourse/discourse/pull/7460)

Thanks for reporting this @MikkoH

---

_[View the full topic](https://meta.discourse.org/t/preview-not-working-with-edge/116226)._
