{
result = repall(result, sandrTty);
result = replaceLinks(result);
- if (wrapper->settings().lineLength() == 0)
- {
- wrapper->settings().setLineLength(78);
- }
return wrapper->wrap(result);
}
case eHelpOutputFormat_Man:
void HelpWriterContext::writeTextBlock(const std::string &text) const
{
- writeTextBlock(TextLineWrapperSettings(), text);
-}
-
-void HelpWriterContext::writeTextBlock(const TextLineWrapperSettings &settings,
- const std::string &text) const
-{
+ TextLineWrapperSettings settings;
+ if (outputFormat() == eHelpOutputFormat_Console)
+ {
+ settings.setLineLength(78);
+ }
outputFile().writeLine(substituteMarkupAndWrapToString(settings, text));
}
* and writes the result directly to the output file.
*/
void writeTextBlock(const std::string &text) const;
- /*! \brief
- * Writes a formatted text block into the output.
- *
- * \param[in] settings Line wrapper settings.
- * \param[in] text Text to format.
- * \throws std::bad_alloc if out of memory.
- * \throws FileIOError on any I/O error.
- *
- * Convenience function that calls substituteMarkupAndWrapToString()
- * and writes the result directly to the output file.
- */
- void writeTextBlock(const TextLineWrapperSettings &settings,
- const std::string &text) const;
private:
class Impl;