svghmi/parse_labels.ysl2
changeset 3469 97622e9560b5
parent 3455 2716cd8e498d
child 3503 49fcd5d62139
--- a/svghmi/parse_labels.ysl2	Fri May 06 11:02:03 2022 +0200
+++ b/svghmi/parse_labels.ysl2	Fri May 06 11:04:17 2022 +0200
@@ -15,7 +15,7 @@
 //
 const "pathregex",!"'^([^\[,]+)(\[[^\]]+\])?([\d,]*)$'"!;
 
-template "*", mode="parselabel" 
+template "*", mode="parselabel"
 {
     const "label","@inkscape:label";
     const "id","@id";
@@ -45,7 +45,7 @@
         attrib "id" > «$id»
         attrib "type" > «$type»
         if "$freq" {
-            if "not(regexp:test($freq,'^[0-9]*(\.[0-9]+)?[smh]'))" {
+            if "not(regexp:test($freq,'^[0-9]*(\.[0-9]+)?[smh]?'))" {
                 error > Widget id:«$id» label:«$label» has wrong syntax of frequency forcing «$freq»
             }
             attrib "freq" > «$freq»