jupyterlab-myst icon indicating copy to clipboard operation
jupyterlab-myst copied to clipboard

`eval` role not working as expected

Open rkansal47 opened this issue 2 years ago • 7 comments

First of all, I want to thank you all for this awesome package! It's made my life a lot easier. I have a minor issue to report regarding the eval role:

{eval}`test`

does not output the value of the test variable but instead just outputs an inline codeblock: test. However, using two `` marks fixes this:

{eval}``test``

Screenshot of issue:

Screenshot 2023-08-06 at 16 19 29

Additional notes

This is using python 3.10, jupyterlab v4.0.4, and jupyterlab-myst v2.0.1.

rkansal47 avatar Aug 06 '23 21:08 rkansal47

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Aug 06 '23 21:08 welcome[bot]

I wanted to re-raise this issue because I'm seeing the same behavior with a clean installation (jupyterlab 4.2.4, jupyterlab-myst 2.4.2).

Interestingly, after executing a markdown cell with the double backticks, the single tick syntax starts working.

chubukov avatar Jul 24 '24 16:07 chubukov

For me (not a clean installation, lots of stuff installed from conda-forge in parallel), with JupyterLab 4.2.2, jupyterlab-myst 2.4.2, both single and double backtick syntaxes result in the following behaviour: on the first cell execution, I get inline code block, but on the second execution of the same cell (if I press Ctrl+Enter again) it is rendered to the value of the variable. I wonder if evaluating the cell again happens to work for you?

srprca avatar Jul 28 '24 17:07 srprca

This is unusual! Let me see if i can reproduce it tomorrow.

agoose77 avatar Jul 28 '24 20:07 agoose77

Just in case my scenario (only rendering on the second execution) is of interest, here is a small screencast reproducing it with a clean install from pip, JupyterLab 4.2.4, jupyterlab-myst 2.4.2. Screencast_20240729_075010.webm

srprca avatar Jul 29 '24 04:07 srprca

@srprca thanks for this reproducer! I can easily replicate the problem locally.

agoose77 avatar Jul 30 '24 11:07 agoose77