summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 215439a..205e818 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -3505,16 +3505,36 @@ DocHtmlCell::Alignment DocHtmlCell::alignment() const
{
HtmlAttribList attrs = attribs();
uint i;
- for (i=0; i<attrs.count(); ++i)
+ for (i=0; i<attrs.count(); ++i)
{
if (attrs.at(i)->name.lower()=="align")
{
- if (attrs.at(i)->value.lower()=="center")
+ if (attrs.at(i)->value.lower()=="center")
return Center;
- else if (attrs.at(i)->value.lower()=="right")
+ else if (attrs.at(i)->value.lower()=="right")
return Right;
else return Left;
}
+ else if (attrs.at(i)->name.lower()=="class")
+ {
+ if (attrs.at(i)->value.lower()=="markdowntableheadcenter")
+ return Center;
+ else if (attrs.at(i)->value.lower()=="markdowntableheadright")
+ return Right;
+ else if (attrs.at(i)->value.lower()=="markdowntableheadleft")
+ return Left;
+ else if (attrs.at(i)->value.lower()=="markdowntableheadnone")
+ return Center;
+ else if (attrs.at(i)->value.lower()=="markdowntablebodycenter")
+ return Center;
+ else if (attrs.at(i)->value.lower()=="markdowntablebodyright")
+ return Right;
+ else if (attrs.at(i)->value.lower()=="markdowntablebodyleft")
+ return Left;
+ else if (attrs.at(i)->value.lower()=="markdowntablebodynone")
+ return Left;
+ else return Left;
+ }
}
return Left;
}
@@ -5037,25 +5057,27 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type
void DocPara::handleImage(const QCString &cmdName)
{
+ QCString saveCmdName = cmdName;
+
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
DocImage::Type t;
@@ -5066,9 +5088,9 @@ void DocPara::handleImage(const QCString &cmdName)
else if (imgType=="rtf") t=DocImage::Rtf;
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"image type %s specified as the first argument of "
- "%s is not valid",
- qPrint(imgType),qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"output format %s specified as the first argument of "
+ "%s command is not valid",
+ qPrint(imgType),qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateFile();
@@ -5077,7 +5099,7 @@ void DocPara::handleImage(const QCString &cmdName)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
HtmlAttribList attrList;