Definition at line 9988 of file context.cpp.
HtmlSpaceless::HtmlSpaceless |
( |
| ) |
|
|
inline |
QCString HtmlSpaceless::remove |
( |
const QCString & |
input | ) |
|
|
inlinevirtual |
Returns the input after removing redundant whitespace
Implements TemplateSpacelessIntf.
Definition at line 9998 of file context.cpp.
References m_insideString, m_insideTag, and m_removeSpaces.
{
QGString result;
const char *p = s.data();
char c;
while ((c=*p++))
{
switch(c)
{
case '<':
result+=c;
break;
case '>':
result+=c;
break;
case '\\':
result+=c;
break;
case '"': case '\'':
{
{
}
{
}
}
result+=c;
break;
case ' ': case '\t': case '\n':
{
m_removeSpaces=TRUE;
}
else
{
result+=' ';
}
break;
default:
result+=c;
m_removeSpaces=FALSE;
break;
}
}
result+='\0';
return result.data();
}
void HtmlSpaceless::reset |
( |
| ) |
|
|
inlinevirtual |
char HtmlSpaceless::m_insideString |
|
private |
bool HtmlSpaceless::m_insideTag |
|
private |
bool HtmlSpaceless::m_removeSpaces |
|
private |
The documentation for this class was generated from the following file: