# HG changeset patch # User Edouard Tisserant # Date 1712146670 -7200 # Node ID ffc8da83fdc2e95ae4f4eb082f70933fe3a01054 # Parent 9bb17341aebba34ddb6117512356e2f18a38bdbe SVG: fix HMI:Assign widget to properly handle single-letter variable names. diff -r 9bb17341aebb -r ffc8da83fdc2 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Thu Mar 28 12:07:24 2024 +0100 +++ b/svghmi/gen_index_xhtml.xslt Wed Apr 03 14:17:50 2024 +0200 @@ -2907,7 +2907,7 @@ - + const diff -r 9bb17341aebb -r ffc8da83fdc2 svghmi/widget_assign.ysl2 --- a/svghmi/widget_assign.ysl2 Thu Mar 28 12:07:24 2024 +0100 +++ b/svghmi/widget_assign.ysl2 Wed Apr 03 14:17:50 2024 +0200 @@ -71,7 +71,7 @@ const "name","substring-before(@value,'=')"; const "value","substring-after(@value,'=')"; const "index" foreach "$paths" if "@assign = $name" value "position()-1"; - const "isVarName", "regexp:test($value,'^[a-zA-Z_][a-zA-Z0-9_]+$')"; + const "isVarName", "regexp:test($value,'^[a-zA-Z_][a-zA-Z0-9_]*$')"; choose { when "$isVarName"{ | const «$value» = this.assignments["«$value»"];