-
Notifications
You must be signed in to change notification settings - Fork 0
disable syntax highlighting and plugin #1
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
Conversation
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
1 similar comment
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
Similar feedback to #2 -- I am curious whether instead of forking and modifying a snapshot of the mathpix dependency, maybe instead we could use |
sebastiansandqvist
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! A big, relatively straightforward reduction in file size. The overall approach still feels a bit sketchy to me, and also essentially forces us to remain on this exact version of mathpix-markdown forever. So, I don't love that aspect of it. But given that we are (I think?) already using this fork, the updates you have made here don't impact that.
Looks like there are other plugins we don't use, too, like this one:
https://shd101wyy.github.io/markdown-preview-enhanced/#/toc
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Thoughts about approach with patch package vs fork here: JuniLearning/MathJax-src#2 (comment) |
One of the plugins Mathpix provides is to do code syntax highlighting. We don't really deal in code and the library used to do this is very large. We can disable this plugin and remove this library to save 1.4 MB from being included in our bundle which will help out page load times.
https://mathpix.com/docs/mathpix-markdown/syntax-reference#code
Note the only code change I made are in the
srcdirectory which is to remove themdPluginHighlightCodeplugin from being added and cleaning up the plugin code itself. The rest of the files are generated from running compile and build.I was thinking about trying to dynamically toggle this plugin on or off based on a feature flag we could pass but then it became tricky how to conditional include it as a dependency in the package.json and handling lazy loading the package at runtime so I figured I'd just remove it clean and if we need/want this functionality later it's easy to import it back in from the base repo.
The highlight js package which can be eliminated from mathpix renderer.
