Relax regex for editable text in Template

- the regex for finding editable text fields in
  the svg code of Templates was too strict and
  missed some fields if the svg had extra characters
  between </tspan> & </text>.
This commit is contained in:
WandererFan
2018-01-26 17:44:26 -05:00
parent 6ae86bc51b
commit 613ecd478d

View File

@@ -295,7 +295,7 @@ std::map<std::string, std::string> DrawSVGTemplate::getEditableTextsFromTemplate
tfile.close();
//this catches all the tags: <text ... </tspan></text>
//keep tagRegex in sync with Gui/QGISVGTemplate.cpp
boost::regex tagRegex ("<text([^>]*freecad:editable=[^>]*)>[^<]*<tspan[^>]*>([^<]*)</tspan></text>");
boost::regex tagRegex ("<text([^>]*freecad:editable=[^>]*)>[^<]*<tspan[^>]*>([^<]*)</tspan>");
boost::regex nameRegex("freecad:editable=\"(.*?)\"");
boost::regex valueRegex("<tspan.*?>(.*?)</tspan>");