JS Exception in composer: method 'shift'


(Kane York) #1

Error in console:

Uncaught TypeError: Cannot call method 'shift' of undefined 
  _.block.lists            vendor-xxx.js
  p.processBlock           vendor-xxx.js
  p.toTree                 vendor-xxx.js
  p.parse                  vendor-xxx.js
  p.toHTMLTree             vendor-xxx.js
  Discourse.Dialect.cook   application-xxx.js
  makeHtml                 application-xxx.js
  w                        application-xxx.js
  later                    application-xxx.js

This error results in the preview not live updating, and 1 error is added for each keypress (where Chrome coalesces repeated JS errors).

Minimal reproduce:

[hi][link]

 - [link]: http://example.com

(Sam Saffron) #2

This is a bug in the markdown parser @eviltrout is going to look at it tomorrow.


(Robin Ward) #3

I’ve just comitted a fix to this:

https://github.com/discourse/discourse/commit/4da76aab962e1b2e8f94fb63ab622370ebc070c3

It should be deployed later today.

I’ve also submitted it upstream to markdown-js:

https://github.com/evilstreak/markdown-js/pull/190


(Sam Saffron) #4