Enhancement - substitutions /from/to/g
- Added support for the "g" modifier to the substitution command, that replace every occurrence of "from" with "to", in the task description and any annotations.
This commit is contained in:
23
src/T.cpp
23
src/T.cpp
@@ -40,6 +40,9 @@ T::T ()
|
||||
mTags.clear ();
|
||||
mAttributes.clear ();
|
||||
mDescription = "";
|
||||
mFrom = "";
|
||||
mTo = "";
|
||||
mGlobal = false;
|
||||
mAnnotations.clear ();
|
||||
}
|
||||
|
||||
@@ -240,17 +243,25 @@ void T::removeAttribute (const std::string& name)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void T::getSubstitution (std::string& from, std::string& to) const
|
||||
void T::getSubstitution (
|
||||
std::string& from,
|
||||
std::string& to,
|
||||
bool& global) const
|
||||
{
|
||||
from = mFrom;
|
||||
to = mTo;
|
||||
from = mFrom;
|
||||
to = mTo;
|
||||
global = mGlobal;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void T::setSubstitution (const std::string& from, const std::string& to)
|
||||
void T::setSubstitution (
|
||||
const std::string& from,
|
||||
const std::string& to,
|
||||
bool global)
|
||||
{
|
||||
mFrom = from;
|
||||
mTo = to;
|
||||
mFrom = from;
|
||||
mTo = to;
|
||||
mGlobal = global;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user