mathpix-markdown-it 1.2.5 → 1.2.7
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.
- package/.idea/workspace.xml +500 -409
- package/README.md +10 -0
- package/es5/bundle.js +1 -1
- package/es5/index.js +1 -1
- package/lib/components/mathpix-markdown/index.js +3 -2
- package/lib/components/mathpix-markdown/index.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js.map +1 -1
- package/lib/markdown/common/consts.d.ts +4 -0
- package/lib/markdown/common/consts.js +5 -1
- package/lib/markdown/common/consts.js.map +1 -1
- package/lib/markdown/highlight/common.js +8 -2
- package/lib/markdown/highlight/common.js.map +1 -1
- package/lib/markdown/highlight/render-rule-highlights.js +50 -9
- package/lib/markdown/highlight/render-rule-highlights.js.map +1 -1
- package/lib/markdown/index.js +3 -2
- package/lib/markdown/index.js.map +1 -1
- package/lib/markdown/mathpix-markdown-plugins.js +4 -3
- package/lib/markdown/mathpix-markdown-plugins.js.map +1 -1
- package/lib/markdown/md-ascii/index.d.ts +3 -2
- package/lib/markdown/md-ascii/index.js.map +1 -1
- package/lib/markdown/md-block-rule/begin-table.js +3 -5
- package/lib/markdown/md-block-rule/begin-table.js.map +1 -1
- package/lib/markdown/md-block-rule/begin-tabular/index.js +6 -14
- package/lib/markdown/md-block-rule/begin-tabular/index.js.map +1 -1
- package/lib/markdown/md-block-rule/lists/index.js +1 -1
- package/lib/markdown/md-block-rule/lists/index.js.map +1 -1
- package/lib/markdown/md-inline-rule/core-inline.js +32 -3
- package/lib/markdown/md-inline-rule/core-inline.js.map +1 -1
- package/lib/markdown/md-inline-rule/image.d.ts +2 -1
- package/lib/markdown/md-inline-rule/image.js.map +1 -1
- package/lib/markdown/md-inline-rule/lists.js +5 -6
- package/lib/markdown/md-inline-rule/lists.js.map +1 -1
- package/lib/markdown/md-inline-rule/tabular.d.ts +2 -1
- package/lib/markdown/md-inline-rule/tabular.js.map +1 -1
- package/lib/markdown/md-renderer-rules/index.js +8 -2
- package/lib/markdown/md-renderer-rules/index.js.map +1 -1
- package/lib/markdown/md-renderer-rules/render-lists.js +17 -17
- package/lib/markdown/md-renderer-rules/render-lists.js.map +1 -1
- package/lib/markdown/md-renderer-rules/render-tabular.js +4 -4
- package/lib/markdown/md-renderer-rules/render-tabular.js.map +1 -1
- package/lib/markdown/mdHighlightCodePlugin.d.ts +1 -7
- package/lib/markdown/mdHighlightCodePlugin.js +62 -17
- package/lib/markdown/mdHighlightCodePlugin.js.map +1 -1
- package/lib/markdown/mdPluginConfigured.d.ts +1 -7
- package/lib/markdown/mdPluginRaw.js +11 -11
- package/lib/markdown/mdPluginRaw.js.map +1 -1
- package/lib/markdown/mdPluginTableTabular.js +2 -2
- package/lib/markdown/mdPluginTableTabular.js.map +1 -1
- package/lib/markdown/mdPluginText.js +8 -10
- package/lib/markdown/mdPluginText.js.map +1 -1
- package/lib/markdown/rules.d.ts +1 -0
- package/lib/markdown/rules.js +16 -5
- package/lib/markdown/rules.js.map +1 -1
- package/lib/markdown/utils.js +28 -23
- package/lib/markdown/utils.js.map +1 -1
- package/lib/mathpix-markdown-model/index.d.ts +6 -0
- package/lib/mathpix-markdown-model/index.js +3 -2
- package/lib/mathpix-markdown-model/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -668,6 +668,7 @@ The `MathpixMarkdown` React element accepts the following props:
|
|
|
668
668
|
| `mathJax` | [TOutputMathJax](https://github.com/Mathpix/mathpix-markdown-it#toutputmathjax);*`{}`* | Sets options to output MathJax |
|
|
669
669
|
| `smiles` | [ISmilesOptions](https://github.com/Mathpix/mathpix-markdown-it#ismilesoptions);*`{}`* | Sets options to output chemistry equation |
|
|
670
670
|
| `parserErrors` | [ParserErrors](https://github.com/Mathpix/mathpix-markdown-it#parsererrors);*`{}`* | Sets options to output parser errors for equations and tabular |
|
|
671
|
+
| `codeHighlight` | [CodeHighlight](https://github.com/Mathpix/mathpix-markdown-it#codehighlight);*`{}`* | Sets options to highlight code block |
|
|
671
672
|
|
|
672
673
|
|
|
673
674
|
## MathpixMarkdownModel methods
|
|
@@ -716,6 +717,7 @@ The `MathpixMarkdown` React element accepts the following props:
|
|
|
716
717
|
| `validateLink` | function;*`null`* | The function `(url: string) => void` to override md link validator |
|
|
717
718
|
| `enableCodeBlockRuleForLatexCommands`| boolean;*`false`* | By default, if latex commands are indented (4 spaces / 1 tab) they do not become `Code Blocks`. |
|
|
718
719
|
| `parserErrors` | [ParserErrors](https://github.com/Mathpix/mathpix-markdown-it#parsererrors);*`{}`* | Sets options to output parser errors for equations and tabular |
|
|
720
|
+
| `codeHighlight` | [CodeHighlight](https://github.com/Mathpix/mathpix-markdown-it#codehighlight);*`{}`* | Sets options to highlight code block |
|
|
719
721
|
|
|
720
722
|
### optionsMathpixMarkdown
|
|
721
723
|
|
|
@@ -745,6 +747,7 @@ The `MathpixMarkdown` React element accepts the following props:
|
|
|
745
747
|
| `validateLink` | function;*`null`* | The function `(url: string) => void` to override md link validator |
|
|
746
748
|
| `enableCodeBlockRuleForLatexCommands`| boolean;*`false`* | By default, if latex commands are indented (4 spaces / 1 tab) they do not become `Code Blocks`. |
|
|
747
749
|
| `parserErrors` | [ParserErrors](https://github.com/Mathpix/mathpix-markdown-it#parsererrors);*`{}`* | Sets options to output parser errors for equations and tabular |
|
|
750
|
+
| `codeHighlight` | [CodeHighlight](https://github.com/Mathpix/mathpix-markdown-it#codehighlight);*`{}`* | Sets options to highlight code block |
|
|
748
751
|
|
|
749
752
|
### TOutputMath
|
|
750
753
|
|
|
@@ -823,6 +826,13 @@ The `MathpixMarkdown` React element accepts the following props:
|
|
|
823
826
|
| `hide` | Hide errors in resulting html |
|
|
824
827
|
| `show_input` | Display original latex instead of error |
|
|
825
828
|
|
|
829
|
+
### CodeHighlight
|
|
830
|
+
|
|
831
|
+
| | type *`default`* | |
|
|
832
|
+
|--------------|------------------------|---------------------------------------------------------------------------------------------------------------|
|
|
833
|
+
| `auto` | boolean *`false`* | Highlighting with language detection |
|
|
834
|
+
| `code` | boolean *`true`* | Add code highlighting for a code block which created by indenting. To auto-detect the language, set auto=true |
|
|
835
|
+
|
|
826
836
|
`sre` Has different loaders for node and browser.
|
|
827
837
|
|
|
828
838
|
1. For **Browser libraries**, synchronous loading is used.
|