isEmptyLine
function isEmptyLine(lineText): boolean;Defined in: packages/engine/src/engine/ExpressionEngineSafety.ts:305
Check if a line is effectively empty (whitespace only or only markdown syntax).
Phase B: Delegates to the ExpressionLexer’s character-by-character markdown line scanner, replacing the old regex-based heuristics.
Skips lines that contain no evaluable expression:
- Whitespace-only lines
- Markdown structural markers (headings, blockquotes, lists without inline solves)
- Code block fences (```)
- MathJax block fences ($$)
- Table separator rows (|---|)
- Horizontal rules (---, ***, ___)
- Standalone wikilinks / embeds ([[…]], ![[…]])
- Whole-line comments (a line whose first non-whitespace characters are
//)
Lines containing inline solves (s...) are never considered empty.
Note: a trailing #/// comment in the MIDDLE of an otherwise-evaluable
line does NOT make isEmptyLine() return true, that line is still an
“expression” line (skip: false). The comment is instead stripped at
tokenization time (ExpressionLexer’s HASH/// handling emits a COMMENT
token for the rest of the line) and then filtered out of the token
stream by ExpressionEngine.prepareExpression() before parsing, so
<expr> // note evaluates identically to <expr> alone.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
lineText | string |
Returns
Section titled “Returns”boolean