Fix org-mode web renderer to handle results containing list in block

- Break out of rendering list if at end of org block in org.js
- This would previous hang rendering results in web interface

Should try fix this upstream in org.js as well
This commit is contained in:
Debanjum Singh Solanky 2023-06-29 19:01:25 -07:00
parent 6c10d68262
commit b950889f47

View file

@ -614,8 +614,10 @@ var Org = (function () {
var notBlankNextToken = this.lexer.peekNextToken();
if (blankToken && !notBlankNextToken.isListElement())
this.lexer.pushToken(blankToken); // Recover blank token only when next line is not listElement.
if (notBlankNextToken.indentation <= rootIndentation)
break; // end of the list
// End of the list if hit less indented line or end of directive
if (notBlankNextToken.indentation <= rootIndentation ||
(notBlankNextToken.type === Lexer.tokens.directive && notBlankNextToken.endDirective))
break;
var element = this.parseElement(); // recursive
if (element)