Yeah, that next line is impacting my plugin as well
@sam, I do have another issue I’m struggling to work around. It seems markdown-it is only getting setup when the composer is open. My main plugin, is the checklist plugin. Everything works fine when the composer was opened and then closed (without refreshing the page)
Knowing that doesn’t probably make a lot of sense, here is a video of it
The error I receive is
Error: Could not find module `pretty-text/engines/markdown-it/helpers` imported from `discourse/plugins/discourse-plugin-checklist/lib/discourse-markdown/checklist`
at requireFrom (discourse-loader:128)
at reify (discourse-loader:106)
at mod.state (discourse-loader:163)
at tryFinally (discourse-loader:30)
at require (discourse-loader:162)
at eval (pretty-text/engines/discourse-markdown-it:208)
at Array.forEach ()
at setup (pretty-text/engines/discourse-markdown-it:206)
at buildOptions (pretty-text/pretty-text:93)
at getOpts (discourse/lib/text:23)
What is mind-boggling is it works just fine once the composer is opened and then closed. It only fails to find said helper import if the composer is never opened (you don’t have to type anything in the composer either).
Here is the code I’ve come up with thus far.
The error is being generated from (which I did not alter for markdown-it – not sure I need to)
Edited: Changed the video URL, as I didn’t realize the dev tools was not captured.