Improve markup substitution in HelpWriterContext.
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 30 Aug 2012 03:48:19 +0000 (06:48 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Mon, 7 Oct 2013 15:07:02 +0000 (18:07 +0300)
commitcaeb87ea1e0b34678229ff1616ba05fa642476d5
tree1c3fbafdb2f90dad241caff575a4d7565f9cd5ae
parentabc93fe9319c22a8fb1a31ce8a59002679fb8ffe
Improve markup substitution in HelpWriterContext.

- substituteMarkup() replaced with an interface that also does line
  wrapping at the same time.  Allows more complex line wrapping that
  can also depend on the input markup, and clarifies responsibilities in
  the code.
- Make TextTableFormatter use the new interface, removing explicit
  substituteMarkup() calls from elsewhere in the code.
- Structure the substitution to allow easy addition of more output
  formats.

Related to #685 and #969.

Change-Id: Id34be9489aa3a90d94cd87f8936b030bc21f1c98
src/gromacs/commandline/cmdlinehelpwriter.cpp
src/gromacs/onlinehelp/helpformat.cpp
src/gromacs/onlinehelp/helpformat.h
src/gromacs/onlinehelp/helpwritercontext.cpp
src/gromacs/onlinehelp/helpwritercontext.h