Skip to content

Editor: multi-line block comments swallow the rest of the recipe #494

Closed

Description

@dubadub

Found while reviewing the fix for #490.

In static/js/src/cooklang-mode.js, the block-comment closer check inside the state.inComment branch (stream.match(/-]/)) is anchored at the current stream position, so a [- … -] comment spanning lines never closes unless a line starts with -]. On seed/Thai Green Curry.cook every line after the block comment renders as a comment: ingredients, timers and preparation notes lose their highlighting.

Fix: search for -] anywhere on the line (e.g. stream.skipTo('-]') then stream.match('-]')), with a test recipe containing a multi-line block comment.

Activity

  1. added 2 commits that reference this issue on Oct 10, 2026
    3506f6a
    2700d3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions