Fix 1638, adding support dynamic loading marked.sj with fallback for v<6 #1639
Fix 1638, adding support dynamic loading marked.sj with fallback for v<6 #1639johnjbarton wants to merge 2 commits intoipython-contrib:masterfrom
Conversation
|
I only verified this works for me on: |
|
Great, thanks a lot for the PR! |
|
CDN: the link in the commit description is just doc. The min.js file is in the directory. license: just copy into the directory? as marked_LICENSE.md? |
…d.js In v6 jupyter notebook components/marked/lib/marked no longer exists. The extension silently falls over. Add https://cdnjs.com/libraries/marked for local loading into the python-markdown directory. Change required path and calls marked -> marked.marked. Add 6.x to yaml compat setting
|
Now that I understand the system a bit better I removed the dynamic load. The fix is simple now and should work for 5x and 6x. The marked.min.js file includes these lines: |
|
I'm hoping someone can take a look before I forget all the details here. |
In v6 jupyter notebook components/marked/lib/marked no longer exists. The extension silently falls over.
Add local copy of marked.min from cdnjs.com into the /python-markdown directory.
require() 'marked' on two paths,
first expecting marked.min.j in the same dir,
second expecting marked in the v6 compenents/ location.
Insert ERROR message in user page if neither is found.