luci-app-lxc: make regex for templates less strict
authorRichard Muzik <[email protected]>
Wed, 2 Jul 2025 05:40:43 +0000 (07:40 +0200)
committerPaul Donald <[email protected]>
Fri, 10 Oct 2025 15:08:49 +0000 (17:08 +0200)
commit7e7461542eee862a4bad2130d337934b663a27ec
tree629971ff4d38a09621d2f6767486a10a04ca05e1
parentac2638ccf990b0a984162bc1f24f7b316224af7c
luci-app-lxc: make regex for templates less strict

Starting with LXC v6.0.0, the way templates are parsed has changed [1].
As a result, trailing whitespace is added to each string except the last
one. However, if the last string (i.e., a timestamp) is shorter—such as
when using a different timestamp format—trailing whitespace will still
be added.

This commit updates the regular expression to handle such cases.

[1] https://github.com/lxc/lxc/commit/84cc3155af502db586f644f1092831155e45ccca

Signed-off-by: Richard Muzik <[email protected]>
applications/luci-app-lxc/luasrc/controller/lxc.lua