diff --git a/src/khoj/interface/web/assets/org.min.js b/src/khoj/interface/web/assets/org.min.js index 0a870c9c..a919b280 100644 --- a/src/khoj/interface/web/assets/org.min.js +++ b/src/khoj/interface/web/assets/org.min.js @@ -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)