From 1e10f9539c1fa07eecce98fc8cc989f6bb1f395a Mon Sep 17 00:00:00 2001 From: Michal Lulco Date: Thu, 2 Mar 2023 02:52:49 +0100 Subject: [PATCH] Latte: added line for labels (#296) --- src/Bridges/FormsLatte/FormMacros.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bridges/FormsLatte/FormMacros.php b/src/Bridges/FormsLatte/FormMacros.php index f2d7fbdb7..9d372719f 100644 --- a/src/Bridges/FormsLatte/FormMacros.php +++ b/src/Bridges/FormsLatte/FormMacros.php @@ -153,7 +153,8 @@ public function macroLabel(MacroNode $node, PhpWriter $writer) : 'if ($ʟ_label = end($this->global->formsStack)[%0.word]' ) . '->%1.raw) echo $ʟ_label' - . ($node->tokenizer->isNext() ? '->addAttributes(%node.array)' : ''), + . ($node->tokenizer->isNext() ? '->addAttributes(%node.array)' : '') + . " /* line $node->startLine */;", $name, $words ? ('getLabelPart(' . implode(', ', array_map([$writer, 'formatWord'], $words)) . ')') : 'getLabel()' );