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

Remove Julia constants that are not exported by default #2601

merged 2 commits into from Oct 23, 2020


Copy link

@knuesel knuesel commented Oct 23, 2020

This PR removed a few unexported constants for Julia. These constants are defined in the Base.MathConstants module, but they are unexported. So it should not be assumed that these names (without a module prefix) represent constants in Julia code.

To illustrate, I ended up here because I was wondering why the e looks funny on . It turns out PrismJS treats e as a Julia constant. This is wrong: by default, someone typing e in Julia will get the error e not defined).

Copy link

@RunDevelopment RunDevelopment commented Oct 23, 2020

Thank for the pull request @knuesel!

The change seems reasonable. I guess you left pi and im because nobody uses them as variables?

The make the build pass, you also have to run npm run build and change Julia's constant test. More information on tests can be found here.

Copy link
Contributor Author

@knuesel knuesel commented Oct 23, 2020

@RunDevelopment sorry for missing that, should be fixed now.

I left im, pi, π and (which is different from e) because these ones are exported, so they are constants in a default setup.

@RunDevelopment RunDevelopment merged commit 093c817 into PrismJS:master Oct 23, 2020
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants