Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
2.6.0
-
None
Description
It would be nice to have a public regexp property in the texttemplate module, that's allow to specify any other matches.
Right now, the texttemplate module supports only hard-coded template matches in a form like ${foo}. But this is useless when, e.g. we need to porting some CMake project to Qbs project.
E..g. in CMake is useda following form @foo@, so, currently it it impossible to use the texttemplate module in this case.
This module right now used the hard-coded regexp:
var rex = /\${(\$|\w+)}/g;
which can't be changed at all.
So, I suggest to make this regex a public, like:
Module {
property var regex: /\${(\$|\w+)}/g
}
which can be changed e.g. with:
\@(\w+)\@
or any other.