mathpix-markdown-it 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +10 -0
  2. package/es5/bundle.js +1 -1
  3. package/es5/index.js +1 -1
  4. package/lib/components/mathpix-markdown/index.js +3 -2
  5. package/lib/components/mathpix-markdown/index.js.map +1 -1
  6. package/lib/copy-to-clipboard/clipboard-copy-element.js +2 -1
  7. package/lib/copy-to-clipboard/clipboard-copy-element.js.map +1 -1
  8. package/lib/index.d.ts +2 -2
  9. package/lib/index.js.map +1 -1
  10. package/lib/markdown/common/consts.d.ts +2 -0
  11. package/lib/markdown/common/consts.js +6 -1
  12. package/lib/markdown/common/consts.js.map +1 -1
  13. package/lib/markdown/common/mmdRules.d.ts +24 -0
  14. package/lib/markdown/common/mmdRules.js +599 -0
  15. package/lib/markdown/common/mmdRules.js.map +1 -0
  16. package/lib/markdown/common/mmdRulesToDisable.d.ts +8 -0
  17. package/lib/markdown/common/mmdRulesToDisable.js +127 -0
  18. package/lib/markdown/common/mmdRulesToDisable.js.map +1 -0
  19. package/lib/markdown/common.d.ts +4 -0
  20. package/lib/markdown/common.js +40 -1
  21. package/lib/markdown/common.js.map +1 -1
  22. package/lib/markdown/index.js +10 -21
  23. package/lib/markdown/index.js.map +1 -1
  24. package/lib/markdown/mathpix-markdown-plugins.js +3 -2
  25. package/lib/markdown/mathpix-markdown-plugins.js.map +1 -1
  26. package/lib/markdown/md-block-rule/begin-table.js +62 -19
  27. package/lib/markdown/md-block-rule/begin-table.js.map +1 -1
  28. package/lib/markdown/md-chemistry/index.js +8 -6
  29. package/lib/markdown/md-chemistry/index.js.map +1 -1
  30. package/lib/markdown/md-inline-rule/refs.js +6 -3
  31. package/lib/markdown/md-inline-rule/refs.js.map +1 -1
  32. package/lib/markdown/md-inline-rule/setcounter-section.js +23 -21
  33. package/lib/markdown/md-inline-rule/setcounter-section.js.map +1 -1
  34. package/lib/markdown/md-inline-rule/text-mode.js +1 -1
  35. package/lib/markdown/md-inline-rule/text-mode.js.map +1 -1
  36. package/lib/markdown/md-inline-rule/underline.js +86 -82
  37. package/lib/markdown/md-inline-rule/underline.js.map +1 -1
  38. package/lib/markdown/md-latex-footnotes/block-rule.js +2 -2
  39. package/lib/markdown/md-latex-footnotes/block-rule.js.map +1 -1
  40. package/lib/markdown/md-theorem/inline-rule.js +124 -110
  41. package/lib/markdown/md-theorem/inline-rule.js.map +1 -1
  42. package/lib/markdown/mdPluginRaw.js +8 -1
  43. package/lib/markdown/mdPluginRaw.js.map +1 -1
  44. package/lib/markdown/mdPluginText.js +96 -86
  45. package/lib/markdown/mdPluginText.js.map +1 -1
  46. package/lib/mathpix-markdown-model/index.d.ts +7 -0
  47. package/lib/mathpix-markdown-model/index.js +3 -2
  48. package/lib/mathpix-markdown-model/index.js.map +1 -1
  49. package/package.json +1 -1
package/README.md CHANGED
@@ -762,6 +762,7 @@ The `MathpixMarkdown` React element accepts the following props:
762
762
  | `codeHighlight` | [CodeHighlight](https://github.com/Mathpix/mathpix-markdown-it#codehighlight);*`{}`* | Sets options to highlight code block |
763
763
  | `footnotes` | [Footnotes](https://github.com/Mathpix/mathpix-markdown-it#footnotes);*`{}`* | Sets options to footnotes |
764
764
  | `copyToClipboard` | boolean;*`false`* | Added copy to clipboard button for code chunks. To handle events, import the function addListenerCopyToClipdoardEvents() from "mathpix-markdown-it/lib/copy-to-clipboard";|
765
+ | `renderOptions` | [RenderOptions](https://github.com/Mathpix/mathpix-markdown-it#renderoptions);*`{}`* | Sets options to enable render rules |
765
766
 
766
767
  ### optionsMathpixMarkdown
767
768
 
@@ -794,6 +795,7 @@ The `MathpixMarkdown` React element accepts the following props:
794
795
  | `codeHighlight` | [CodeHighlight](https://github.com/Mathpix/mathpix-markdown-it#codehighlight);*`{}`* | Sets options to highlight code block |
795
796
  | `footnotes` | [Footnotes](https://github.com/Mathpix/mathpix-markdown-it#footnotes);*`{}`* | Sets options to footnotes |
796
797
  | `copyToClipboard` | boolean;*`false`* | Added copy to clipboard button for code chunks. To handle events, import the function addListenerCopyToClipdoardEvents() from "mathpix-markdown-it/lib/copy-to-clipboard";|
798
+ | `renderOptions` | [RenderOptions](https://github.com/Mathpix/mathpix-markdown-it#renderoptions);*`{}`* | Sets options to enable render rules |
797
799
 
798
800
  ### TOutputMath
799
801
 
@@ -875,6 +877,14 @@ The `MathpixMarkdown` React element accepts the following props:
875
877
  |----------------|-----------------------------|-------------------------------------------|
876
878
  | `fontSize` | string *`unset`* | Ability to change font size for footnotes |
877
879
 
880
+ ### RenderOptions
881
+
882
+ | | type *`default`* | |
883
+ |-----------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
884
+ | `enable_markdown` | boolean *`true`* | Enable markdown rules. If it is set to `false`, then all markdown rules will be disabled. This also disables the rules for `enable_markdown_mmd_extensions`. |
885
+ | `enable_latex` | boolean *`true`* | Enable latex rules. If it is set to `false`, then all latex and math rules will be disabled. |
886
+ | `enable_markdown_mmd_extensions` | boolean *`true`* | Enable markdown mmd extensions rules: `smiles`, `asciiMath`, `mathML`. If it is set to `false` then these rules will be disabled. |
887
+
878
888
  ### TAccessibility
879
889
 
880
890
  | | type *`default`* | description