#include "main.h"
//#include "misc.h"
#include "Table.h"
-#include "utils/richtext.h"
#include "utils/misc.h" // for kind_to_string_localized and string_patch_status
#include "utils/text.h"
#include "search.h"
{
cout << _("Summary: ") << res->summary() << endl;
cout << _("Description: ") << endl;
- printRichText( cout, res->description(), 2/*indented*/ );
+ Zypper::instance()->out().printRichText( res->description(), 2/*indented*/ );
}
/**
#include <zypp/ProgressData.h>
#include "utils/prompt.h"
+#include "utils/richtext.h"
#include "output/prompt.h"
using namespace zypp;
/** NORMAL: An empty line */
void gap() { if ( type() == TYPE_NORMAL ) std::cout << std::endl; }
+ void printRichText( std::string text, unsigned indent_r = 0U )
+ { ::printRichText( std::cout, text, indent_r, termwidth() ); }
+
/**
* Show an info message.
*
_RTtagmap["center"] = CENTER;
_RTtagmap["strong"] = BOLD; // same as necurses
_RTtagmap["blockquote"] = BLOCKQUOTE; // same as necurses
-
+
}
string closeTag(vector<tags>& tagStack)
case HR:
tagStack.pop_back(); //hr haven't closing tag
return "--------------------";
-
+
case PARAGRAPH:
return "";
case BREAK_LINE:
return "";
}
}
-
+
DBG << end <<" "<<str.substr(0,end) << endl;
return ampersmap[str.substr(0,end)];
if(tagEndPos==text.npos)
{
WAR << "ended with non-closed tag " << endl;
- return res;
+ return res;
}
string tagname = text.substr(pos+1,tagEndPos-pos-1);
pos = tagEndPos;
#include <iosfwd>
#include <zypp/base/String.h>
-/** Convert . */
-//std::string processRichText( const std::string& text );
-
/** Print [Rich]Text optionally indented. */
-inline std::ostream & printRichText( std::ostream & str, std::string text, unsigned indent_r = 0U )
+inline std::ostream & printRichText( std::ostream & str, std::string text, unsigned indent_r = 0U, unsigned width_r = 0U )
{
std::string processRichText( const std::string& text );
if ( text.find("DT:Rich") != std::string::npos )
text = processRichText( text );
- return str::printIndented( str, text, indent_r ); // even unindented as it also asaerts a trailing '/n'
+ return zypp::str::printIndented( str, text, indent_r, width_r ); // even unindented as it also asserts a trailing '/n'
}
-
#endif
BuildRequires: cmake >= 2.4.6
BuildRequires: gcc-c++ >= 4.7
BuildRequires: gettext-devel >= 0.15
-BuildRequires: libzypp-devel >= 14.14.0
+BuildRequires: libzypp-devel >= 14.15.0
BuildRequires: readline-devel >= 5.1
Requires: procps
%if 0%{?suse_version}