Skip to content

Commit

Permalink
Merge pull request #305 from Mathpix/dev/olga/8383-Some-rendering-dif…
Browse files Browse the repository at this point in the history
…ferences-between-simpleMath-and-multiMath-for-block-math

PR into master from dev/olga/8383-Some-rendering-differences-between-simpleMath-and-multiMath-for-block-math
  • Loading branch information
iammosespaulr authored Feb 9, 2024
2 parents 3f68deb + 921caad commit 153c3ae
Show file tree
Hide file tree
Showing 17 changed files with 142 additions and 38 deletions.
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: 4 additions & 1 deletion lib/markdown/md-inline-rule/tabular.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/md-inline-rule/tabular.js.map

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

31 changes: 22 additions & 9 deletions lib/markdown/mdPluginRaw.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/mdPluginRaw.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/markdown/utils.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/utils.js.map

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions lib/mathjax/mathjax.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/mathjax/mathjax.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 package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mathpix-markdown-it",
"version": "1.2.28",
"version": "1.2.29",
"description": "Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)",
"keywords": [
"MathJax",
Expand Down
5 changes: 4 additions & 1 deletion src/markdown/md-inline-rule/tabular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ export const inlineTabular: RuleInline = (state, silent) => {
return false;
}
const endMarker= '\\end{tabular}';
const endMarkerPos = state.src.lastIndexOf(endMarker);
let endMarkerPos = state.src
.slice(startMathPos)
.lastIndexOf(endMarker);
if (endMarkerPos === -1) {
return false;
}
endMarkerPos += startMathPos;
const nextPos = endMarkerPos + endMarker.length;
if (!silent) {
const token = state.push("tabular_inline", "", 0);
Expand Down
Loading

0 comments on commit 153c3ae

Please # to comment.