Changeset View
Changeset View
Standalone View
Standalone View
src/backends/sage/sageexpression.cpp
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Line(s) | 183 | { | |||
---|---|---|---|---|---|
196 | if(isHtml) | 196 | if(isHtml) | ||
197 | { | 197 | { | ||
198 | stripped.remove( QRegExp( QLatin1String("<[a-zA-Z\\/][^>]*>") ) ); | 198 | stripped.remove( QRegExp( QLatin1String("<[a-zA-Z\\/][^>]*>") ) ); | ||
199 | } | 199 | } | ||
200 | if (stripped.endsWith(QLatin1Char('\n'))) | 200 | if (stripped.endsWith(QLatin1Char('\n'))) | ||
201 | stripped.chop(1); | 201 | stripped.chop(1); | ||
202 | 202 | | |||
203 | if (m_isHelpRequest) | 203 | if (m_isHelpRequest) | ||
204 | { | | |||
205 | //Escape whitespace | | |||
206 | stripped.replace( QLatin1Char(' '), QLatin1String(" ")); | | |||
207 | | ||||
208 | //make things quoted in `` `` bold | | |||
209 | stripped.replace(QRegExp(QLatin1String("``([^`]*)``")), QLatin1String("<b>\\1</b>")); | | |||
210 | | ||||
211 | result=new Cantor::HelpResult(stripped); | 204 | result=new Cantor::HelpResult(stripped); | ||
212 | } | | |||
213 | else | 205 | else | ||
214 | { | | |||
215 | result=new Cantor::TextResult(stripped); | 206 | result=new Cantor::TextResult(stripped); | ||
216 | } | | |||
217 | 207 | | |||
218 | if(isLatex) | 208 | if(isLatex) | ||
219 | result->setFormat(Cantor::TextResult::LatexFormat); | 209 | result->setFormat(Cantor::TextResult::LatexFormat); | ||
220 | 210 | | |||
221 | addResult(result); | 211 | addResult(result); | ||
222 | } | 212 | } | ||
223 | 213 | | |||
224 | if (hasImage) | 214 | if (hasImage) | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |