suppress some sources of spurious ellipsises in abstracts
This commit is contained in:
+1
-18
@@ -69,7 +69,7 @@ class DocSeqFiltSpec {
|
||||
by native capability (ex: docseqdb can sort and filter). The
|
||||
implementation might be nicer by using more sophisticated c++ with
|
||||
multiple inheritance of sort and filter virtual interfaces, but
|
||||
the current one will have to do for now...
|
||||
the current one will have to do for now.
|
||||
*/
|
||||
class DocSequence {
|
||||
public:
|
||||
@@ -97,17 +97,6 @@ class DocSequence {
|
||||
abs.push_back(doc.meta[Rcl::Doc::keyabs]);
|
||||
return true;
|
||||
}
|
||||
virtual string getAbstract(Rcl::Doc& doc) {
|
||||
vector<string> v;
|
||||
getAbstract(doc, v);
|
||||
string abstract;
|
||||
for (vector<string>::const_iterator it = v.begin();
|
||||
it != v.end(); it++) {
|
||||
abstract += *it;
|
||||
abstract += "... ";
|
||||
}
|
||||
return abstract;
|
||||
}
|
||||
virtual bool getEnclosing(Rcl::Doc&, Rcl::Doc&) = 0;
|
||||
|
||||
/** Get estimated total count in results */
|
||||
@@ -169,12 +158,6 @@ public:
|
||||
return false;
|
||||
return m_seq->getAbstract(doc, abs);
|
||||
}
|
||||
virtual string getAbstract(Rcl::Doc& doc)
|
||||
{
|
||||
if (m_seq.isNull())
|
||||
return "";
|
||||
return m_seq->getAbstract(doc);
|
||||
}
|
||||
virtual string getDescription()
|
||||
{
|
||||
if (m_seq.isNull())
|
||||
|
||||
@@ -184,12 +184,14 @@ void ResListPager::displayDoc(RclConfig *config,
|
||||
|
||||
for (vector<string>::const_iterator it = vabs.begin();
|
||||
it != vabs.end(); it++) {
|
||||
// No need to call escapeHtml(), plaintorich handles it
|
||||
list<string> lr;
|
||||
m_hiliter->set_inputhtml(false);
|
||||
m_hiliter->plaintorich(*it, lr, hdata);
|
||||
richabst += lr.front();
|
||||
richabst += absSep();
|
||||
if (!it->empty()) {
|
||||
// No need to call escapeHtml(), plaintorich handles it
|
||||
list<string> lr;
|
||||
m_hiliter->set_inputhtml(false);
|
||||
m_hiliter->plaintorich(*it, lr, hdata);
|
||||
richabst += lr.front();
|
||||
richabst += absSep();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user