preview-inline
preview-inline copied to clipboard
dead loop on parsing math block that starts from the beginning of the document.
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.
fixed in commit: 9deac014e9c6a7ec29709b5d048e114c8db2859c
end mark "$$" at the last line also cause the dead loop, another path to fix it: fixed in commit: 48ac96c