Daniel, you said on github about the automatic removal of leading whitespaces on a matched line:
this is not how vqmod works! this is a feature you want!
you should indent yourself.
The search should match the search expression on the line, and then just replace the match with the subsituted data. It should not do anything else, like removing leading whitespaces on the matched line. Only the matched search expression, or the subsituted data from the add-node text should be allowed to be trimmed, depending on the '
trim' attributes. See
https://github.com/vqmod/vqmod/wiki/Scripting on how vqmod does it! I just tested it with QPhoria's latest VQmod 2.5.1 and my own VQmod 2.4.1 on OpenCart 2.0.0.1b.
If we want VQmod features, with just using a different OCmod XML syntax, then your current code is wrong. If you like, I can easily implement your planned OCmod XML syntax, I already have VQmod-XML anyway, the main change would only be the relocation of the '
position' and '
offset' attributes from the '
search' node to the '
add' node, and some other minor changes ('
name' instead of '
id', or introducing the '
code' and '
link' nodes that didn't exist in VQmod, or removing the
vqmver node etc).