Skip to content

Commit 2351634

Browse files
committed
fix: use single-line twig content in versioning test for race detector compatibility
The tree-sitter external scanner has a bug that causes multiline twig blocks to parse incorrectly when the Go race detector is enabled. Changed the test content to single-line format to avoid this issue while still testing the diagnostic logic.
1 parent b80a24d commit 2351634

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

internal/lsp/diagnostics/twig_versioning_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ func TestTwigVersioningDiagnosticsProvider_originalNotFoundMessage(t *testing.T)
3030
provider := NewTwigVersioningDiagnosticsProvider(server)
3131

3232
uri := "file:///tmp/myext/Resources/views/storefront/page/checkout/foo.html.twig"
33-
content := []byte(`{% sw_extends '@Storefront/storefront/page/checkout/foo' %}
34-
{# shopware-block: abc123def456@6.4.15.0 #}
35-
{% block content %}
36-
<p>Override</p>
37-
{% endblock %}`)
33+
content := []byte(`{% sw_extends '@Storefront/storefront/page/checkout/foo' %}{# shopware-block: abc123def456@6.4.15.0 #}{% block content %}test{% endblock %}`)
3834

3935
parser := tree_sitter.NewParser()
4036
lang := tree_sitter.NewLanguage(tree_sitter_twig.Language())

0 commit comments

Comments
 (0)