From 99c1a11218c41472eb27cc37ac14201a9c50b84c Mon Sep 17 00:00:00 2001 From: Daniel Demmel Date: Mon, 29 Jun 2026 22:53:03 +0100 Subject: [PATCH] Fix #58: highlight script attributes appearing before type The inline_script rule matched the opening '; + await assertScope(src, 'id', 'entity.other.attribute-name.id.html'); + await assertScope(src, 't', 'string.quoted.double.handlebars'); + // The script body is still recognised as an embedded handlebars template. + await assertScope(src, 'script', 'entity.name.tag.script.html'); +}); + +test('#58: id attribute after type is still highlighted (no regression)', async () => { + const src = ''; + await assertScope(src, 'id', 'entity.other.attribute-name.id.html'); + await assertScope(src, 't', 'string.quoted.double.handlebars'); +}); + +test('#58: a plain text/javascript script is NOT a handlebars template', async () => { + // The lookahead must not fire for a non-handlebars type; the body should fall + // through to source.js, not the handlebars embedding. + const src = '