Replace some [BR] in help texts with rst literals
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 9 Feb 2015 16:08:24 +0000 (18:08 +0200)
committerTeemu Murtola <teemu.murtola@gmail.com>
Fri, 13 Feb 2015 14:39:39 +0000 (15:39 +0100)
commit17ab61aa47957979eb16392be77bd336d82f0adc
treeb13916e6bc13e710aa6cac286d77e656a9456e4f
parent1876477ef6075e10c27e90fac7d17508bea3f119
Replace some [BR] in help texts with rst literals

[BR] cannot really be implemented in rst, so replace those [BR]
instances that were used to implement literal blocks with rst literal
blocks.  Refactor the help output formatting such that line breaks in
the input string get transfered literally to rst output, and make the
console output aware of the line breaks in the input string so that it
can do wrapping as required.  Fix cases that do not produce valid rst
now that leading whitespaces are no longer stripped.

As a side effect of this change, remaining [BR] instances in the help
are now somewhat uglier in the console output, but that can hopefully be
fixed in the future.  On the other hand, the literal blocks look much
nicer on the html and man pages.

Change-Id: If67106c74f84de04d55a2e8c300949c5a297f909
34 files changed:
src/gromacs/commandline/cmdlinehelpmodule.cpp
src/gromacs/commandline/cmdlinehelpwriter.cpp
src/gromacs/gmxana/gmx_anaeig.c
src/gromacs/gmxana/gmx_analyze.c
src/gromacs/gmxana/gmx_cluster.c
src/gromacs/gmxana/gmx_density.c
src/gromacs/gmxana/gmx_editconf.c
src/gromacs/gmxana/gmx_enemat.c
src/gromacs/gmxana/gmx_energy.c
src/gromacs/gmxana/gmx_hbond.c
src/gromacs/gmxana/gmx_make_edi.c
src/gromacs/gmxana/gmx_nmtraj.c
src/gromacs/gmxana/gmx_order.c
src/gromacs/gmxana/gmx_trjcat.c
src/gromacs/gmxana/gmx_trjconv.c
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxpreprocess/grompp.c
src/gromacs/onlinehelp/helptopic.h
src/gromacs/onlinehelp/helpwritercontext.cpp
src/gromacs/onlinehelp/tests/CMakeLists.txt
src/gromacs/onlinehelp/tests/helpwritercontext.cpp [new file with mode: 0644]
src/gromacs/onlinehelp/tests/refdata/HelpWriterContextTest_CleansUpExtraWhitespace.xml [new file with mode: 0644]
src/gromacs/onlinehelp/tests/refdata/HelpWriterContextTest_FormatsLiteralText.xml [new file with mode: 0644]
src/gromacs/onlinehelp/tests/refdata/HelpWriterContextTest_FormatsParagraphs.xml [new file with mode: 0644]
src/gromacs/onlinehelp/tests/refdata/HelpWriterContextTest_FormatsRstStyleParagraphs.xml [new file with mode: 0644]
src/gromacs/options/options.cpp
src/gromacs/selection/selhelp.cpp
src/gromacs/selection/sm_distance.cpp
src/gromacs/selection/sm_merge.cpp
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/utility/stringutil.cpp
src/gromacs/utility/stringutil.h
src/gromacs/utility/tests/refdata/ConcatenateStringsTest_HandlesDifferentStringEndings.xml [deleted file]
src/gromacs/utility/tests/stringutil.cpp