Skip to content
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

Feat: support eval directives/roles #41

Merged
merged 5 commits into from Jun 11, 2022

Conversation

agoose77
Copy link
Collaborator

This adds support for the eval`expr` role and

:::{eval}expr
:::

:::{eval:figure} myplot
:name: myplot
My plot with a mean value of {eval}`mean`.
:::

directives.

We do this by parsing the expression, and expecting the renderer to transform the expression into rendered content. Currently this relies on jupyterlab-imarkdown to do this, which already supports these kinds of tokens.

jupyterlab-imarkdown is not the only way to render these tokens - it does a lot more in order to store the results in the cell attachments

I do add an install dependency for the Python package on this extension, but it is an extra for now.

@agoose77 agoose77 merged commit b21459a into executablebooks:main Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant