diff options
-rw-r--r-- | doc/commands.doc | 2 | ||||
-rw-r--r-- | doc/htmlcmds.doc | 4 | ||||
-rw-r--r-- | examples/memgrp.cpp | 4 | ||||
-rw-r--r-- | src/cmdmapper.cpp | 2 | ||||
-rw-r--r-- | src/cmdmapper.h | 2 | ||||
-rw-r--r-- | src/code.l | 2 | ||||
-rw-r--r-- | src/commentscan.l | 2 | ||||
-rw-r--r-- | src/config.xml | 2 | ||||
-rw-r--r-- | src/docbookvisitor.cpp | 2 | ||||
-rw-r--r-- | src/docgroup.cpp | 17 | ||||
-rw-r--r-- | src/docgroup.h | 2 | ||||
-rw-r--r-- | src/docparser.cpp | 36 | ||||
-rw-r--r-- | src/docparser.h | 4 | ||||
-rw-r--r-- | src/doctokenizer.l | 4 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 6 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/mandocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/markdown.cpp | 1 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 2 | ||||
-rw-r--r-- | src/printdocvisitor.h | 6 | ||||
-rw-r--r-- | src/rtfdocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/xmldocvisitor.cpp | 6 | ||||
-rw-r--r-- | templates/xml/compound.xsd | 2 | ||||
-rw-r--r-- | testing/086/086__style__tags_8h.xml | 13 | ||||
-rw-r--r-- | testing/086_style_tags.h | 17 |
25 files changed, 126 insertions, 18 deletions
diff --git a/doc/commands.doc b/doc/commands.doc index 6c8b696..48991fb 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -849,7 +849,7 @@ Structural indicators This command turns a comment block into a header definition of a member group. The comment block should be followed by a - <code>//\@{ ... //\@}</code> block containing the + <code>///\@{ ... ///\@}</code> block containing the members of the group. See section \ref memgroup for an example. diff --git a/doc/htmlcmds.doc b/doc/htmlcmds.doc index d483237..12347ab 100644 --- a/doc/htmlcmds.doc +++ b/doc/htmlcmds.doc @@ -45,6 +45,8 @@ of a HTML tag are passed on to the HTML output only \ref cmdendcode "\\endcode". <li><tt>\<DD\></tt> Starts an item description. <li><tt>\</DD\></tt> Ends an item description. +<li><tt>\<DEL\></tt> Starts a section of deleted text, typically shown strike through text. +<li><tt>\</DEL\></tt> Ends a section of deleted text. <li><tt>\<DFN\></tt> Starts a piece of text displayed in a typewriter font. <li><tt>\</DFN\></tt> Ends a <tt>\<DFN\></tt> section. <li><tt>\<DIV></tt> Starts a section with a specific style (HTML only) @@ -71,6 +73,8 @@ of a HTML tag are passed on to the HTML output only <li><tt>\<I\></tt> Starts a piece of text displayed in an italic font. <li><tt>\</I\></tt> Ends a <tt>\<I\></tt> section. <li><tt>\<IMG SRC="..." ...\></tt> This command is written with its attributes to the HTML output only. The SRC attribute is mandatory. +<li><tt>\<INS\></tt> Starts a section of inserted text, typically shown as underlined text. +<li><tt>\</INS\></tt> Ends a section of inserted text. <li><tt>\<LI\></tt> Starts a new list item. <li><tt>\</LI\></tt> Ends a list item. <li><tt>\<OL\></tt> Starts a numbered item list. diff --git a/examples/memgrp.cpp b/examples/memgrp.cpp index 9a24774..fdcf028 100644 --- a/examples/memgrp.cpp +++ b/examples/memgrp.cpp @@ -2,11 +2,11 @@ class Memgrp_Test { public: - //@{ + ///@{ /** Same documentation for both members. Details */ void func1InGroup1(); void func2InGroup1(); - //@} + ///@} /** Function without group. Details. */ void ungroupedFunction(); diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index 55f8214..b4d35d4 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -197,6 +197,8 @@ CommandMap htmlTagMap[] = { "blockquote", HTML_BLOCKQUOTE }, { "strike", HTML_STRIKE }, { "u", HTML_UNDERLINE }, + { "ins", HTML_INS }, + { "del", HTML_DEL }, { "c", XML_C }, // { "code", XML_CODE }, <= ambiguous <code> is also a HTML tag diff --git a/src/cmdmapper.h b/src/cmdmapper.h index 8c49b3f..d670cd4 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -179,6 +179,8 @@ enum HtmlTagType HTML_BLOCKQUOTE= 33, HTML_STRIKE = 34, HTML_UNDERLINE = 35, + HTML_INS = 36, + HTML_DEL = 37, XML_CmdMask = 0x100, @@ -268,7 +268,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name) QCString typeName(ltype.left(i)); ClassDef* newDef = 0; QCString templateArgs(ltype.right(ltype.length() - i)); - if ( + if ( !typeName.isEmpty() && ( // look for class definitions inside the code block (varType=g_codeClassSDict->find(typeName)) || // otherwise look for global class definitions diff --git a/src/commentscan.l b/src/commentscan.l index a52821c..933bd59 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -2545,7 +2545,7 @@ static bool handleName(const QCString &, const QCStringList &) BEGIN( NameParam ); if (!Doxygen::docGroup.isEmpty()) // end of previous member group { - Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE); + Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE,true); } } return stop; diff --git a/src/config.xml b/src/config.xml index 8e19d67..966072f 100644 --- a/src/config.xml +++ b/src/config.xml @@ -482,7 +482,7 @@ Go to the <a href="commands.html">next</a> section or return to the <docs> <![CDATA[ If the \c JAVADOC_BANNER tag is set to \c YES then doxygen - will interpret a line such as "/***************" as being the + will interpret a line such as \verbatim /***************\endverbatim as being the beginning of a Javadoc-style comment "banner". If set to \c NO, the Javadoc-style will behave just like regular comments and it will not be interpreted by doxygen. diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 1901454..24fb43f 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -263,7 +263,9 @@ DB_VIS_C case DocStyleChange::Small: /* XSLT Stylesheets can be used */ break; /* HTML only */ case DocStyleChange::Strike: break; + case DocStyleChange::Del: break; case DocStyleChange::Underline: break; + case DocStyleChange::Ins: break; case DocStyleChange::Div: /* HTML only */ break; case DocStyleChange::Span: /* HTML only */ break; } diff --git a/src/docgroup.cpp b/src/docgroup.cpp index 2dcca70..1f4fb6d 100644 --- a/src/docgroup.cpp +++ b/src/docgroup.cpp @@ -119,15 +119,18 @@ void DocGroup::open(Entry *e,const char *,int, bool implicit) } } -void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline) +void DocGroup::close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit) { - if (m_openCount < 1) + if (!implicit) { - warn(fileName,line,"unbalanced grouping commands"); - } - else - { - m_openCount--; + if (m_openCount < 1) + { + warn(fileName,line,"unbalanced grouping commands"); + } + else + { + m_openCount--; + } } //printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) m_autoGroupStack=%d\n", // e->name.data(),e->section,fileName,line,m_autoGroupStack.count()); diff --git a/src/docgroup.h b/src/docgroup.h index 4ce9af9..4775d90 100644 --- a/src/docgroup.h +++ b/src/docgroup.h @@ -33,7 +33,7 @@ class DocGroup void enterCompound(const char *fileName,int line,const char *name); void leaveCompound(const char *,int,const char * /*name*/); void open(Entry *e,const char *,int,bool implicit=false); - void close(Entry *e,const char *fileName,int line,bool foundInline); + void close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit=false); void initGroupInfo(Entry *e); bool isEmpty() const; void clearHeader(); diff --git a/src/docparser.cpp b/src/docparser.cpp index 790fbb5..a18237e 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -475,7 +475,7 @@ static void checkArgumentName(const QCString &name) static void checkRetvalName(const QCString &name) { if (!Config_getBool(WARN_IF_DOC_ERROR)) return; - if (g_memberDef==0) return; // not a member + if (g_memberDef==0 || name.isEmpty()) return; // not a member or no valid name if (g_retvalsFound.find(name)) { warn_doc_error(g_memberDef->getDefFileName(), @@ -1016,7 +1016,9 @@ const char *DocStyleChange::styleString() const case DocStyleChange::Div: return "div"; case DocStyleChange::Span: return "span"; case DocStyleChange::Strike: return "strike"; + case DocStyleChange::Del: return "del"; case DocStyleChange::Underline: return "u"; + case DocStyleChange::Ins: return "ins"; } return "<invalid>"; } @@ -1546,6 +1548,16 @@ reparsetoken: handleStyleLeave(parent,children,DocStyleChange::Strike,tokenName); } break; + case HTML_DEL: + if (!g_token->endTag) + { + handleStyleEnter(parent,children,DocStyleChange::Del,&g_token->attribs); + } + else + { + handleStyleLeave(parent,children,DocStyleChange::Del,tokenName); + } + break; case HTML_UNDERLINE: if (!g_token->endTag) { @@ -1556,6 +1568,16 @@ reparsetoken: handleStyleLeave(parent,children,DocStyleChange::Underline,tokenName); } break; + case HTML_INS: + if (!g_token->endTag) + { + handleStyleEnter(parent,children,DocStyleChange::Ins,&g_token->attribs); + } + else + { + handleStyleLeave(parent,children,DocStyleChange::Ins,tokenName); + } + break; case HTML_CODE: case XML_C: if (!g_token->endTag) @@ -5894,9 +5916,15 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta case HTML_STRIKE: handleStyleEnter(this,m_children,DocStyleChange::Strike,&g_token->attribs); break; + case HTML_DEL: + handleStyleEnter(this,m_children,DocStyleChange::Del,&g_token->attribs); + break; case HTML_UNDERLINE: handleStyleEnter(this,m_children,DocStyleChange::Underline,&g_token->attribs); break; + case HTML_INS: + handleStyleEnter(this,m_children,DocStyleChange::Ins,&g_token->attribs); + break; case HTML_CODE: if (/*getLanguageFromFileName(g_fileName)==SrcLangExt_CSharp ||*/ g_xmlComment) // for C# source or inside a <summary> or <remark> section we @@ -6309,9 +6337,15 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) case HTML_STRIKE: handleStyleLeave(this,m_children,DocStyleChange::Strike,"strike"); break; + case HTML_DEL: + handleStyleLeave(this,m_children,DocStyleChange::Del,"del"); + break; case HTML_UNDERLINE: handleStyleLeave(this,m_children,DocStyleChange::Underline,"u"); break; + case HTML_INS: + handleStyleLeave(this,m_children,DocStyleChange::Ins,"ins"); + break; case HTML_CODE: handleStyleLeave(this,m_children,DocStyleChange::Code,"code"); break; diff --git a/src/docparser.h b/src/docparser.h index cab1589..70d13f9 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -382,7 +382,9 @@ class DocStyleChange : public DocNode Span = (1<<8), Div = (1<<9), Strike = (1<<10), - Underline = (1<<11) + Underline = (1<<11), + Del = (1<<12), + Ins = (1<<13) }; DocStyleChange(DocNode *parent,uint position,Style s,bool enable, diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 5346c0a..15fedbe 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -405,8 +405,8 @@ WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}" WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'" CAPTION [cC][aA][pP][tT][iI][oO][nN] HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" -HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"|"strike"|"u" -HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"|"STRIKE"|"U" +HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"|"strike"|"u"|"del"|"ins" +HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"|"STRIKE"|"U"|"DEL"|"INS" HTMLKEYW {HTMLKEYL}|{HTMLKEYU} REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?) REFWORD2 {REFWORD2_PRE}{FUNCARG2}? diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index 05cdc42..5bcedd1 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -403,9 +403,15 @@ void HtmlDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Strike: if (s->enable()) m_t << "<strike" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</strike>"; break; + case DocStyleChange::Del: + if (s->enable()) m_t << "<del" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</del>"; + break; case DocStyleChange::Underline: if (s->enable()) m_t << "<u" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</u>"; break; + case DocStyleChange::Ins: + if (s->enable()) m_t << "<ins" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</ins>"; + break; case DocStyleChange::Italic: if (s->enable()) m_t << "<em" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</em>"; break; diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 9652580..7706064 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -292,9 +292,11 @@ void LatexDocVisitor::visit(DocStyleChange *s) if (s->enable()) m_t << "{\\bfseries{"; else m_t << "}}"; break; case DocStyleChange::Strike: + case DocStyleChange::Del: if (s->enable()) m_t << "\\sout{"; else m_t << "}"; break; case DocStyleChange::Underline: + case DocStyleChange::Ins: if (s->enable()) m_t << "\\uline{"; else m_t << "}"; break; case DocStyleChange::Italic: diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 9f5a45b..7b7194e 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -137,9 +137,11 @@ void ManDocVisitor::visit(DocStyleChange *s) m_firstCol=FALSE; break; case DocStyleChange::Strike: + case DocStyleChange::Del: /* not supported */ break; case DocStyleChange::Underline: //underline is shown as emphasis + case DocStyleChange::Ins: if (s->enable()) m_t << "\\fI"; else m_t << "\\fP"; m_firstCol=FALSE; break; diff --git a/src/markdown.cpp b/src/markdown.cpp index 8154b8f..ec04b21 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2590,6 +2590,7 @@ void MarkdownFileParser::parseInput(const char *fileName, QCString docs = fileBuf; QCString id; QCString title=extractPageTitle(docs,id).stripWhiteSpace(); + if (QString(id).startsWith("autotoc_md")) id = ""; g_indentLevel=title.isEmpty() ? 0 : -1; QCString titleFn = QFileInfo(fileName).baseName().utf8(); QCString fn = QFileInfo(fileName).fileName().utf8(); diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 7a804b1..441c4d3 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -640,7 +640,9 @@ void PerlModDocVisitor::visit(DocStyleChange *s) { case DocStyleChange::Bold: style = "bold"; break; case DocStyleChange::Strike: style = "strike"; break; + case DocStyleChange::Del: style = "del"; break; case DocStyleChange::Underline: style = "underline"; break; + case DocStyleChange::Ins: style = "ins"; break; case DocStyleChange::Italic: style = "italic"; break; case DocStyleChange::Code: style = "code"; break; case DocStyleChange::Subscript: style = "subscript"; break; diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index b4997fd..7fc7e3d 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -108,9 +108,15 @@ class PrintDocVisitor : public DocVisitor case DocStyleChange::Strike: if (s->enable()) printf("<strike>"); else printf("</strike>"); break; + case DocStyleChange::Del: + if (s->enable()) printf("<del>"); else printf("</del>"); + break; case DocStyleChange::Underline: if (s->enable()) printf("<underline>"); else printf("</underline>"); break; + case DocStyleChange::Ins: + if (s->enable()) printf("<ins>"); else printf("</ins>"); + break; case DocStyleChange::Italic: if (s->enable()) printf("<italic>"); else printf("</italic>"); break; diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 4e89193..760769e 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -236,9 +236,11 @@ void RTFDocVisitor::visit(DocStyleChange *s) if (s->enable()) m_t << "{\\b "; else m_t << "} "; break; case DocStyleChange::Strike: + case DocStyleChange::Del: if (s->enable()) m_t << "{\\strike "; else m_t << "} "; break; case DocStyleChange::Underline: + case DocStyleChange::Ins: if (s->enable()) m_t << "{\\ul "; else m_t << "} "; break; case DocStyleChange::Italic: diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index c8d23a8..af6ed75 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -190,9 +190,15 @@ void XmlDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Strike: if (s->enable()) m_t << "<strike>"; else m_t << "</strike>"; break; + case DocStyleChange::Del: + if (s->enable()) m_t << "<del>"; else m_t << "</del>"; + break; case DocStyleChange::Underline: if (s->enable()) m_t << "<underline>"; else m_t << "</underline>"; break; + case DocStyleChange::Ins: + if (s->enable()) m_t << "<ins>"; else m_t << "</ins>"; + break; case DocStyleChange::Italic: if (s->enable()) m_t << "<emphasis>"; else m_t << "</emphasis>"; break; diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index 7a65bd2..6eb7e0a 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -418,6 +418,8 @@ <xsd:element name="superscript" type="docMarkupType" /> <xsd:element name="center" type="docMarkupType" /> <xsd:element name="small" type="docMarkupType" /> + <xsd:element name="del" type="docMarkupType" /> + <xsd:element name="inc" type="docMarkupType" /> <xsd:element name="htmlonly" type="docHtmlOnlyType" /> <xsd:element name="manonly" type="xsd:string" /> <xsd:element name="xmlonly" type="xsd:string" /> diff --git a/testing/086/086__style__tags_8h.xml b/testing/086/086__style__tags_8h.xml new file mode 100644 index 0000000..a1803da --- /dev/null +++ b/testing/086/086__style__tags_8h.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="086__style__tags_8h" kind="file" language="C++"> + <compoundname>086_style_tags.h</compoundname> + <briefdescription> + </briefdescription> + <detaileddescription> + <para>In the following the word tag has the style as indicated before it.<itemizedlist><listitem><para>This is a bold <bold>tag</bold>.</para></listitem><listitem><para>This is a <computeroutput>strong</computeroutput> bold <bold>tag</bold>.</para></listitem><listitem><para>This is an italic <emphasis>tag</emphasis>.</para></listitem><listitem><para>This is an <computeroutput>em</computeroutput> italic <emphasis>tag</emphasis>.</para></listitem><listitem><para>This is a strike through <strike>tag</strike>.</para></listitem><listitem><para>This is an underline <underline>tag</underline>.</para></listitem><listitem><para>This is an insterted <ins>tag</ins>.</para></listitem><listitem><para>This is a deleted <del>tag</del>.</para></listitem><listitem><para>This is a typewriter <computeroutput>tag</computeroutput>. </para></listitem></itemizedlist> +</para> + </detaileddescription> + <location file="086_style_tags.h"/> + </compounddef> +</doxygen> diff --git a/testing/086_style_tags.h b/testing/086_style_tags.h new file mode 100644 index 0000000..105adca --- /dev/null +++ b/testing/086_style_tags.h @@ -0,0 +1,17 @@ +// objective: test different HTML style tags +// check: 086__style__tags_8h.xml +/** +\file + +In the following the word tag has the style as indicated before it. +- This is a bold <b>tag</b>. +- This is a `strong` bold <strong>tag</strong>. +- This is an italic <i>tag</i>. +- This is an `em` italic <em>tag</em>. +- This is a strike through <strike>tag</strike>. +- This is an underline <u>tag</u>. +- This is an insterted <ins>tag</ins>. +- This is a deleted <del>tag</del>. +- This is a typewriter <tt>tag</tt>. +*/ + |