Skip to content

[3.9 regression] Markdown: multi-line {% … %} statement after a table is absorbed into the table, corrupting Jinja/Liquid templates #19724

Closed

Description

@fisker

Prettier v3.9.6
Playground link

--parser markdown

Input:

{% macro param_table(params=None) -%}
| Argument | Type |
| -------- | ---- |
{% set default_params = {
    "model": ["str"],
} %}
{% endmacro %}

Output:

{% macro param_table(params=None) -%}

| Argument                  | Type |
| ------------------------- | ---- |
| {% set default_params = { |

    "model": ["str"],

} %}
{% endmacro %}

Expected output:

Same as input.

Why?

Original issue #19723

Activity

  1. added theissue type on Jul 25, 2026
  2. added
    help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!
    on Jul 25, 2026
  3. fisker commented on Jul 25, 2026

    @fisker
    MemberAuthor

    //cc @seiyab

  4. seiyab commented on Jul 26, 2026

    @seiyab
    Collaborator

    Should we also consider following is also a bug? I guess they share the cause.

    Prettier v3.9.6
    Playground link

    --parser markdown

    Input:

    > abc
    {% abc %}

    Output:

    > abc
    > {% abc %}
    
  5. fisker commented on Jul 26, 2026

    @fisker
    MemberAuthor

    It looks to me like it requires an empty line to start a liquid node? Is there anything we can do in the liquid parsing?

  6. seiyab commented on Jul 26, 2026

    @seiyab
    Collaborator

    Not sure but probably adding flow syntax for liquid might help. I guess it only has text (inline) syntax as of now.

  7. tzh476 commented on Aug 17, 2026

    @tzh476

    The Markdown Liquid flow fix landed in #19838 (merged 2026-08-15 as 560146e). This issue can be closed.

  8. fisker commented on Aug 17, 2026

    @fisker
    MemberAuthor

    Thanks, forgot to link issue in #19838

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

    help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:markdownIssues affecting Markdown

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions