preview-inline icon indicating copy to clipboard operation
preview-inline copied to clipboard

dead loop on parsing math block that starts from the beginning of the document.

Open freason opened this issue 5 years ago • 2 comments

As title, If the beginning tag of math block "$$" is the first word of the document, there will be a dead loop on activating preview inline,

An I had found the root cause: in math-marker.js, in the function getMathBlock, if minRow is negative is not checked, so scopeDescriptorForBufferPosition will always give the same string when minRow is lower than zero, which makes the dead loop.

"$$" at the last line also cause the dead loop, root cause is similar, scopeDescriptorForBufferPosition always gives the same result when maxRow is over the last line.

freason avatar Mar 15 '19 06:03 freason

fixed in commit: 9deac014e9c6a7ec29709b5d048e114c8db2859c

freason avatar Mar 15 '19 06:03 freason

end mark "$$" at the last line also cause the dead loop, another path to fix it: fixed in commit: 48ac96c

freason avatar Mar 25 '19 10:03 freason