-
Notifications
You must be signed in to change notification settings - Fork 19
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
Certain inline html not rendering correctly #64
Comments
This is with mystjs 0.1.3 btw. |
@rowanc1 based upon the fact that the https://spec.myst.tools renderer shows the (seemingly) correct AST but non-rendered output, I think this is a |
Yep, this is going to be a deeper issue in mystjs parser. It was originally all aimed towards secure html / semantic meaning, so we disabled html (both a security hole & difficult to translate to all the various other renderers). @fwkoch is doing surgery in the parser at the moment, and this would be a good thing to consider as well if we can! Related: executablebooks/jupyterlab-mystjs#34 |
We fixed up certain pieces in Currently HTML is actually being parsed and trying to be "understood", rather than fully rendered as is. We are doing this because MyST likes to understand more for rendering out to other formats like Word/LaTeX/JATS. I think that the behaviour in JupyterLab need to mimic a bit closer what happens today, and that is going to be a different chunk of work! Leaving this open for now, but it should have some improvements in |
One more quick update on this, which I suspect may be useful for those looking for a work around (granted, it's not ideal):
The HTML renders as expected. |
Another work around in that case is to use MyST, an image or figure directive! :) ```{figure} https://source.unsplash.com/random/400x200?beach,ocean
:name: myFigure
:alt: Random image of the beach or ocean!
:align: center
Relaxing at the beach 🏝 🌊 😎
``` |
On the same line, plain HTML/bootstrap admonitions such as:
are apparently not supported. Looking at the produced html with Since HTML admonitions are used quite regularly --it will take time for If useful, I can make and provide a screenshot and/or create a separate issue. Reported by Henri-Jean Garchon |
@nthiery if you need this feature now, you can temporarily pin Meanwhile, @rowanc1 and the team can give a better idea of if/when we'll be able to bring the 1.0 series to feature parity on this topic. :) |
I'll ad to @nthiery's comments above that I hope these use cases can be brought along, even as much as I appreciate that from the developer's perspective, they may be somewhat painful to support. The reality is that a lot of content exists out there that relies on these conventions, and we'll hit significant adoption barriers if the transition path is too bumpy for users who are busy with other things. It's the tough tradeoff of meeting messy real-world usage! Thanks again team for being so responsive. |
Thanks @nthiery and @fperez -- this is absolutely something we will support, and now bumping up to high on the priority list. We will try to get this addressed soon so that @nthiery can reinstall! :) @nthiery this issue is fine to track the issue, once we start working on it we might ping you in the PR to get a few more of the use-cases to ensure you are covered. Thanks again both for the feedback! |
Good to know, @nthiery! If you're willing to be a tester, it would be great to get your feedback once we have some progress here; I would like to stop maintaining |
I am your man. Tell me when I should test again! |
I was just about to create an issue saying that my P.S. For context, I'm trying to just |
Just for the record: HTML links and |
Also I had to stop using So now you have a dedicated early adopter of the latest 1.1.* line :-) |
I have installed the latest alpha release with #118 merged in, and played with it on
I have deployed it in our computer lab for testing by 50 students during our next session, 30 minutes from now. |
Ah yes, I can see why the |
👋 @agoose77 Looking forward to more feedback @nthiery from your class! |
Sorry, no additional feedback. It just worked :-) |
Have played around with @fwkoch's approach for HTML rendering this afternoon, and I don't think that I can improve it that much. (i.e. I don't think the approach I described above is a good plan anymore.) I did fix up some style issues around There are a lot of edge cases that I found around block html elements (e.g One future challenge that I am not sure how/if we want to solve is having the myst-style content rendered inside of an HTML block, e.g. a hover cross-reference or abbreviation. Or do we just do the most basic HTML rendering when you have opted to use HTML directly. If we go with myst-style content inside a div, this syntax becomes much closer to |
I cannot seem to to reproduce this @nthiery: Which version are you working with? |
Ah, yes, sorry, I missed some context. The failing kbd's actually were sitting within a div.
|
I still see an issue trying to load images in using HTML The main reason against me using the markdown format is the image styling - I really need to be able to set the |
As well as |
You can use the |
@agoose77 I have a hacky and untested tool (coded in part by claude.ai) linked above that attempts to convert the html |
Describe the bug
context
I have notebooks with inline html that isn't rendering correctly.
Reproduce the bug
In a markdown cell, the following content:
renders in "normal" JupyterLab correctly as:
while mystjs renders it incorrectly as:
List your environment
The text was updated successfully, but these errors were encountered: