-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
[add] add rehype-katex-notranslate plugin for docs #181
Conversation
Thanks for sharing @PrinOrange! 🙇 General feedback on what gets included in the plugins list:
source: syntax-tree/hast#24 (comment) For your plugin I'm seeing:
Some additional specific pointers.
|
Thank you for your review. I have done some changes and fixes issues you mentioned above. |
Hi! I would really recommend that you type the input of your top function: You are using some formatter to rewrite the table of contents. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 154 154
=========================================
Hits 154 154 ☔ View full report in Codecov by Sentry. |
Even better: change the type annotation of the plugin from Also replace the |
Oh, sorry, I have re-format the documents and make it passed the CLI check. I also have followed your advice and rewrites the typing of Thank you all. |
@PrinOrange looks like the readme here still has an unwanted change? Can you revert that? Thanks! |
Signed-off-by: Titus <[email protected]>
Initial checklist
Description of changes
When a page contains a large number of katex formulas, if we want to use a tool to translate the webpage (such as the built-in translation tool of Google Chrome), the translation tool will often translate the symbols in the katex block, which will cause the formula to be destroyed.
So I wrote a rehype plugin rehype-katex-notranslate. This plugin add the attribute translate="no" to the katex formula generated by rehype-katex to prevent the formulas from being recognized and translated by webpage and browser translation tools.