Skip to content

Commit

Permalink
Merge pull request #325 from Mathpix/dev/olga/Add-the-ability-to-disa…
Browse files Browse the repository at this point in the history
…ble-Markdown-rules

PR into master from dev/olga/Add-the-ability-to-disable-Markdown-rules
  • Loading branch information
nicodjimenez authored May 15, 2024
2 parents 1982fae + 9a56b31 commit edf6433
Show file tree
Hide file tree
Showing 53 changed files with 4,776 additions and 88 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ The `MathpixMarkdown` React element accepts the following props:
| `codeHighlight` | [CodeHighlight](https://github.com/Mathpix/mathpix-markdown-it#codehighlight);*`{}`* | Sets options to highlight code block |
| `footnotes` | [Footnotes](https://github.com/Mathpix/mathpix-markdown-it#footnotes);*`{}`* | Sets options to footnotes |
| `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";|
| `renderOptions` | [RenderOptions](https://github.com/Mathpix/mathpix-markdown-it#renderoptions);*`{}`* | Sets options to enable render rules |

### optionsMathpixMarkdown

Expand Down Expand Up @@ -794,6 +795,7 @@ The `MathpixMarkdown` React element accepts the following props:
| `codeHighlight` | [CodeHighlight](https://github.com/Mathpix/mathpix-markdown-it#codehighlight);*`{}`* | Sets options to highlight code block |
| `footnotes` | [Footnotes](https://github.com/Mathpix/mathpix-markdown-it#footnotes);*`{}`* | Sets options to footnotes |
| `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";|
| `renderOptions` | [RenderOptions](https://github.com/Mathpix/mathpix-markdown-it#renderoptions);*`{}`* | Sets options to enable render rules |

### TOutputMath

Expand Down Expand Up @@ -875,6 +877,14 @@ The `MathpixMarkdown` React element accepts the following props:
|----------------|-----------------------------|-------------------------------------------|
| `fontSize` | string *`unset`* | Ability to change font size for footnotes |

### RenderOptions

| | type *`default`* | |
|-----------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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`. |
| `enable_latex` | boolean *`true`* | Enable latex rules. If it is set to `false`, then all latex and math rules will be disabled. |
| `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. |

### TAccessibility

| | type *`default`* | description
Expand Down
2 changes: 1 addition & 1 deletion es5/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion es5/index.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions lib/components/mathpix-markdown/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/components/mathpix-markdown/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import MathpixLoader from './components/mathpix-loader';
import MathpixMarkdown from './components/mathpix-markdown';
import { mathpixMarkdownPlugin, initMathpixMarkdown } from './markdown/mathpix-markdown-plugins';
import { mdPluginMathJax, mdPluginHighlightCode, mdPluginText, mdPluginTOC, mdPluginAnchor, mdPluginTableTabular, mdPluginList, mdPluginChemistry, mdPluginCollapsible, mdLatexFootnotes, mdSetPositionsAndHighlight } from "./markdown/mdPluginConfigured";
import { MathpixMarkdownModel, TMarkdownItOptions, optionsMathpixMarkdown, TOutputMath, TOutputMathJax, THtmlSanitize, TTocStyle, THighlight, ParserErrors, CodeHighlight, Footnotes } from "./mathpix-markdown-model";
import { MathpixMarkdownModel, TMarkdownItOptions, optionsMathpixMarkdown, TOutputMath, TOutputMathJax, THtmlSanitize, TTocStyle, THighlight, ParserErrors, CodeHighlight, Footnotes, RenderOptions } from "./mathpix-markdown-model";
import { ISmilesOptions } from './markdown/md-chemistry';
import { resetTheoremEnvironments } from './markdown/md-theorem/helper';
import { rest_mmd_footnotes_list } from './markdown/md-latex-footnotes/utils';
import { FootnoteItem } from './markdown/md-latex-footnotes/interfaces';
import { eLabelType, ILabel, getLabelsList, getLabelByKeyFromLabelsList, clearLabelsList } from "./markdown/common/labels";
import { normalizeLink } from './helpers/normalize-link';
export { MathpixLoader, MathpixMarkdown, MathpixMarkdownModel, mathpixMarkdownPlugin, mdPluginCollapsible, mdLatexFootnotes, mdSetPositionsAndHighlight, initMathpixMarkdown, mdPluginMathJax, mdPluginHighlightCode, mdPluginText, mdPluginTOC, mdPluginAnchor, mdPluginTableTabular, mdPluginList, mdPluginChemistry, TMarkdownItOptions, optionsMathpixMarkdown, TOutputMath, TOutputMathJax, THtmlSanitize, ISmilesOptions, resetTheoremEnvironments, rest_mmd_footnotes_list, FootnoteItem, TTocStyle, THighlight, CodeHighlight, ParserErrors, Footnotes, eLabelType, ILabel, getLabelsList, getLabelByKeyFromLabelsList, clearLabelsList, normalizeLink };
export { MathpixLoader, MathpixMarkdown, MathpixMarkdownModel, mathpixMarkdownPlugin, mdPluginCollapsible, mdLatexFootnotes, mdSetPositionsAndHighlight, initMathpixMarkdown, mdPluginMathJax, mdPluginHighlightCode, mdPluginText, mdPluginTOC, mdPluginAnchor, mdPluginTableTabular, mdPluginList, mdPluginChemistry, TMarkdownItOptions, optionsMathpixMarkdown, TOutputMath, TOutputMathJax, THtmlSanitize, ISmilesOptions, resetTheoremEnvironments, rest_mmd_footnotes_list, FootnoteItem, TTocStyle, THighlight, CodeHighlight, ParserErrors, Footnotes, eLabelType, ILabel, getLabelsList, getLabelByKeyFromLabelsList, clearLabelsList, normalizeLink, RenderOptions };
2 changes: 1 addition & 1 deletion lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/markdown/common/consts.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { RenderOptions } from "../../mathpix-markdown-model";
export declare const attr_value: string;
export declare const attribute: string;
export declare const openTagMML: RegExp;
Expand Down Expand Up @@ -127,3 +128,4 @@ export declare const codeHighlightDef: {
auto: boolean;
code: boolean;
};
export declare const renderOptionsDef: RenderOptions;
Loading

0 comments on commit edf6433

Please sign in to comment.