Skip to content

Commit 153c3ae

Browse files
Merge pull request #305 from Mathpix/dev/olga/8383-Some-rendering-differences-between-simpleMath-and-multiMath-for-block-math
PR into master from dev/olga/8383-Some-rendering-differences-between-simpleMath-and-multiMath-for-block-math
2 parents 3f68deb + 921caad commit 153c3ae

File tree

17 files changed

+142
-38
lines changed

17 files changed

+142
-38
lines changed

es5/bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

es5/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/markdown/md-inline-rule/tabular.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/markdown/md-inline-rule/tabular.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/markdown/mdPluginRaw.js

Lines changed: 22 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/markdown/mdPluginRaw.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/markdown/utils.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/markdown/utils.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/mathjax/mathjax.js

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/mathjax/mathjax.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mathpix-markdown-it",
3-
"version": "1.2.28",
3+
"version": "1.2.29",
44
"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)",
55
"keywords": [
66
"MathJax",

src/markdown/md-inline-rule/tabular.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ export const inlineTabular: RuleInline = (state, silent) => {
1414
return false;
1515
}
1616
const endMarker= '\\end{tabular}';
17-
const endMarkerPos = state.src.lastIndexOf(endMarker);
17+
let endMarkerPos = state.src
18+
.slice(startMathPos)
19+
.lastIndexOf(endMarker);
1820
if (endMarkerPos === -1) {
1921
return false;
2022
}
23+
endMarkerPos += startMathPos;
2124
const nextPos = endMarkerPos + endMarker.length;
2225
if (!silent) {
2326
const token = state.push("tabular_inline", "", 0);

0 commit comments

Comments
 (0)