Skip to content

Commit

Permalink
Removed DisableRulesGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
Olga Redozubova authored and Olga Redozubova committed May 15, 2024
1 parent a3e406e commit 9a56b31
Show file tree
Hide file tree
Showing 16 changed files with 12 additions and 1,828 deletions.
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -883,19 +883,7 @@ The `MathpixMarkdown` React element accepts the following props:
|-----------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `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&nbsp;*`true`* | Enable markdown mmd extensions rules: `<smiles>...</smiles>`, `<ascii>...</ascii>`, `mathML`. If it is set to `false` then these rules will be disabled. |
| `disableRulesGroup` | [DisableRulesGroup](https://github.com/Mathpix/mathpix-markdown-it#disablerulesgroup);*`null`* | Groups of rules that should be excluded from rendering (this api is subject to change). |

### DisableRulesGroup

| | type&nbsp;*`default`* | |
|--------------|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `chem` | boolean&nbsp;*`false`* | Disable chem rules: `<smiles>...</smiles>`. If should be to disable only rules for chem. And neither `enable_markdown` nor `enable_markdown_mmd_extensions` are set to `false`. |
| `html` | boolean&nbsp;*`false`* | Disable html rules. If should be to disable only rules for html. And `enable_markdown` is not set to `false`. |
| `asciiMath` | boolean&nbsp;*`false`* | Disable asciiMath rules `<ascii>...</ascii>`. If should be to disable only rules for asciiMath. And neither `enable_markdown` nor `enable_markdown_mmd_extensions` are set to `false`. |
| `math` | boolean&nbsp;*`false`* | Disable math rules `$...$, $$...$$, \(...\), \[...\]`. If should be to disable only the rules for math. This will also disable rules for simpleMath. And `enable_latex` is not set to `false`. |
| `simpleMath` | boolean&nbsp;*`false`* | Disable simpleMath rules `$...$, $$...$$`. If should be to disable only rules for simpleMath. And `enable_latex` is not set to `false`. |
| `mathML` | boolean&nbsp;*`false`* | Disable mathML rules `mathML`. If should be to disable only rules for mathML. And neither `enable_markdown` nor `enable_markdown_mmd_extensions` are set to `false`. |
| `enable_markdown_mmd_extensions` | boolean&nbsp;*`true`* | Enable markdown mmd extensions rules: `smiles`, `asciiMath`, `mathML`. If it is set to `false` then these rules will be disabled. |

### TAccessibility

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.

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, RenderOptions, DisableRulesGroup } 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, RenderOptions, DisableRulesGroup };
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 };
23 changes: 1 addition & 22 deletions lib/markdown/common/mmdRulesToDisable.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/markdown/common/mmdRulesToDisable.js.map

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

2 changes: 1 addition & 1 deletion lib/markdown/md-renderer-rules/render-lists.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export declare const render_enumerate_list_open: (tokens: any, index: any, optio
export declare const render_item_inline: (tokens: any, index: any, options: any, env: any, slf: any) => string;
export declare const render_latex_list_item_open: (tokens: any, index: any, options: any, env: any, slf: any) => string;
export declare const render_latex_list_item_close: () => string;
export declare const render_itemize_list_close: () => "</ul></li>" | "</ul>";
export declare const render_itemize_list_close: () => "</ul>" | "</ul></li>";
export declare const render_enumerate_list_close: () => string;
9 changes: 0 additions & 9 deletions lib/mathpix-markdown-model/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,10 @@ export type CodeHighlight = {
auto?: boolean;
code?: boolean;
};
export type DisableRulesGroup = {
chem?: boolean;
html?: boolean;
asciiMath?: boolean;
math?: boolean;
simpleMath?: boolean;
mathML?: boolean;
};
export type RenderOptions = {
enable_markdown?: boolean;
enable_latex?: boolean;
enable_markdown_mmd_extensions?: boolean;
disableRulesGroup?: DisableRulesGroup;
};
export declare enum TTocStyle {
summary = "summary",
Expand Down
Loading

0 comments on commit 9a56b31

Please sign in to comment.