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

🎨 Update CSS classes applied to math nodes to match remark-math #862

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

sglyon
Copy link
Contributor

@sglyon sglyon commented Jan 22, 2024

change math block to math-display and math inline to math-inline

ref #859

change `math block` to `math-display` and `math inline` to `math-inline`
Copy link

welcome bot commented Jan 22, 2024

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out EBP's Code of Conduct and our Contributing Guide, as this will greatly help the review process.

Welcome to the EBP community! 🎉

@sglyon
Copy link
Contributor Author

sglyon commented Jan 22, 2024

I'm working on fixing some tests right now! Will ping when ready!

@sglyon
Copy link
Contributor Author

sglyon commented Jan 22, 2024

@rowanc1 ok I think we are about ready to go.

I added some very simple tests to myst-to-html

It seems like myst-parser gets some tests based on the examples in the myst-spec package. I make a related PR over there to update the class names: jupyter-book/myst-spec#63

So, if we are able to merge/release myst-spec and then update the dependency over here the tests should pass ;)

@rowanc1
Copy link
Member

rowanc1 commented Jan 22, 2024

Thanks so much for this work @sglyon.

A question @agoose77 had this morning was ensuring that we don't need to also add $$ or \[ or other text delimiters into the output? Do you have knowledge of if that will be desirable/necessary in the remark/rehype pipelines?

@@ -65,7 +65,7 @@ const math: Handler = (h, node) => {
};

const inlineMath: Handler = (h, node) => {
return h(node, 'span', { class: 'math inline' }, [
return h(node, 'span', { class: 'math-inline' }, [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So many changes for a -!! 🚀 Thanks again @sglyon for your help on this.

@sglyon
Copy link
Contributor Author

sglyon commented Jan 24, 2024

Hey @rowanc1 I don't think it will be necessary because of how the ast looks, but I don't know for sure...

From what I can tell by the tests over there I thiknk we will be good without adding additional characters: https://github.com/remarkjs/remark-math/blob/e99b9d088709d743adf6a43551fd416d7e0014ed/packages/rehype-katex/test.js#L27-L47

@rowanc1
Copy link
Member

rowanc1 commented Jan 24, 2024

Fantastic! Thank you, will get this in shortly!! (Away from my keyboard now..)

@rowanc1 rowanc1 changed the title Update classes applied to math nodes to match remark-math 🎨 Update CSS classes applied to math nodes to match remark-math Jan 24, 2024
@rowanc1 rowanc1 merged commit f78db0b into jupyter-book:main Jan 24, 2024
4 checks passed
Copy link

welcome bot commented Jan 24, 2024

Congrats on your first merged pull request in this project! 🎉
congrats

Thank you for contributing, we are very proud of you! ❤️

@rowanc1
Copy link
Member

rowanc1 commented Jan 24, 2024

Thanks again @sglyon for your help in tracking these down and improving them in various repos!

@sglyon
Copy link
Contributor Author

sglyon commented Jan 24, 2024

Awesome!! looking forward to a release and I'll test it out in my app ;)

@sglyon
Copy link
Contributor Author

sglyon commented Jan 29, 2024

@rowanc1 could we get a new build out for myst-to-html? Then I can start using 👏

@rowanc1
Copy link
Member

rowanc1 commented Jan 29, 2024

We are planning on releasing later today!

@rowanc1
Copy link
Member

rowanc1 commented Jan 30, 2024

Version 1.0.22 should now be out! Thanks again for your help.

@sglyon
Copy link
Contributor Author

sglyon commented Jan 30, 2024 via email

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.

2 participants