Fix for template autoFill processing with "k" tokens, the attribute wasnt being selected to parse. Fixes #363

This commit is contained in:
2025-07-17 21:57:57 +08:00
parent d90bc32887
commit 715fe92da4
2 changed files with 49 additions and 0 deletions

View File

@@ -415,6 +415,7 @@ class Template
preg_match_all('/(\d+)/',trim($match_subst),$substrarray);
$delimiter = ($match_delim === '') ? ' ' : preg_quote($match_delim);
$result .= sprintf("%s = get_attribute('%s');\n",$match_attr,$match_attr);
$result .= sprintf(" %s = %s.split('%s')[%s];\n",$match_attr,$match_attr,$delimiter,$substrarray[1][0] ?? '0');
} else {