-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URLs in Code cells get mangled #104
Comments
I can confirm that this happens. I was able to reproduce this issue. Another way of explaining it is if you have markdown syntax for images in a code cell, nbdev will change the path as if though its a markdown cell., Granted, I have never tried to put markdown in a code cell before, especially in a Jupyter Notebook, but @TylerLeonhardt has a legit use case where needs to do this for PowerShell Notebooks. |
Added a test for markdown cells (it was forgotten by mistake). Thanks for flagging the issue! |
You cannot yet - I had to pin the version because of another nbdev bug which will prevent you from enjoying this fix. I’m going to help test that and then Sylvian will cut another release. TLDR; you can’t yet but I’ll comment on this thread when it’s all ready and tested. Thanks everyone for the coordination |
Related issue is #105. |
@TylerLeonhardt this should be ready now, you can proceed by just re-generating your pages and everything will just work. I don't even think you have to upgrade anything |
Original issue over in fastpages fastai/fastpages#215
Take a look at this notebook and scroll down to the NOTE.
https://tylerleonhardt.github.io/blog/jupyter/powershell/pswordcloud/2020/03/16/Word-Clouds.html
I'm using a magic command
#!markdown
to render markdown instead of a normal code block so I can show the markdown code behind it.Unfortunately, for some reason fastpages mangles the path of my svg in the code sample:
instead of
which is what it is in source:
https://github.com/TylerLeonhardt/blog/blob/56e0f224d03866fd5118131ab41bcb8effb81453/_notebooks/2020-03-16-Word-Clouds.ipynb#L110
Expected Behavior
My url isn't touched.
Actual Behavior
My url is mangled.
Proposed solution
Don't expand image tags in Code blocks?
More context
so
#!markdown
is exposed by .NET Interactive:https://github.com/dotnet/interactive
Which is a new hybrid-language kernel that supports the ability to call upon languages within different cells using magic commands
It supports:
C#, F#, PowerShell, JavaScript, HTML, Markdown
If the default language is PowerShell, for example, and I want to have a cell use Markdown, I can use the
#!markdown
magic commandNow I can agree that a #!markdown magic command is kinda silly because.. well... that's what a Markdown cell is for...
But the difference is that you see the markdown in addition to the output.
I guess It'd be the equivalent to a Markdown cell of:
My markdown code
The text was updated successfully, but these errors were encountered: