Empty comment lines break parsing

Author: fastfkCreated Sep 16, 2026Updated Sep 16, 2026
Labelsbug

Describe the bug As per subject, empty comment lines break parsing of the rest of the document


%% test
%%
%% test2
gantt
    Title Not working

-->

Error: Error: Parse error on line 6:
%%gantt    Title Not
--^
Expecting 'gantt', got 'NL'

Removing the empty line makes it work:


%% test
%% test2
gantt
    Title Working

--> Renders

To Reproduce Broken Working

Expected behavior This used to work ~2 weeks ago

Source: mermaid-js/mermaid-live-editor