diff options
author | albert-github <albert.tests@gmail.com> | 2019-08-16 10:46:21 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-08-16 10:46:21 (GMT) |
commit | cf82dae5f6a9fddcc24e9b7acc110f72fa0442df (patch) | |
tree | 039206e73b27e367e643323b73c0795ef2ee7dec /src | |
parent | 66ae8f62afbdc98c1c190fcc74a8263e7e6a0aa8 (diff) | |
download | Doxygen-cf82dae5f6a9fddcc24e9b7acc110f72fa0442df.zip Doxygen-cf82dae5f6a9fddcc24e9b7acc110f72fa0442df.tar.gz Doxygen-cf82dae5f6a9fddcc24e9b7acc110f72fa0442df.tar.bz2 |
Adding HTML s tag, XML corrections for other tags
Adding the HTML `<s>` tag (https://www.w3schools.com/tags/tag_s.asp).
Adding 's' and correcting 'inc' to 'ins' in compound.xsd
Diffstat (limited to 'src')
-rw-r--r-- | src/cmdmapper.cpp | 1 | ||||
-rw-r--r-- | src/cmdmapper.h | 1 | ||||
-rw-r--r-- | src/docbookvisitor.cpp | 1 | ||||
-rw-r--r-- | src/docparser.cpp | 18 | ||||
-rw-r--r-- | src/docparser.h | 3 | ||||
-rw-r--r-- | src/doctokenizer.l | 4 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 3 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 1 | ||||
-rw-r--r-- | src/mandocvisitor.cpp | 1 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 1 | ||||
-rw-r--r-- | src/printdocvisitor.h | 3 | ||||
-rw-r--r-- | src/rtfdocvisitor.cpp | 1 | ||||
-rw-r--r-- | src/xmldocvisitor.cpp | 3 |
13 files changed, 37 insertions, 4 deletions
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index b4d35d4..fa4f147 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -196,6 +196,7 @@ CommandMap htmlTagMap[] = { "div", HTML_DIV }, { "blockquote", HTML_BLOCKQUOTE }, { "strike", HTML_STRIKE }, + { "s", HTML_S }, { "u", HTML_UNDERLINE }, { "ins", HTML_INS }, { "del", HTML_DEL }, diff --git a/src/cmdmapper.h b/src/cmdmapper.h index d670cd4..d44e834 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -181,6 +181,7 @@ enum HtmlTagType HTML_UNDERLINE = 35, HTML_INS = 36, HTML_DEL = 37, + HTML_S = 38, XML_CmdMask = 0x100, diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index ce3a845..10d7cea 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -262,6 +262,7 @@ DB_VIS_C /* There is no equivalent Docbook tag for rendering Small text */ case DocStyleChange::Small: /* XSLT Stylesheets can be used */ break; /* HTML only */ + case DocStyleChange::S: break; case DocStyleChange::Strike: break; case DocStyleChange::Del: break; case DocStyleChange::Underline: break; diff --git a/src/docparser.cpp b/src/docparser.cpp index 9dd1c71..ad83aff 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1020,6 +1020,7 @@ const char *DocStyleChange::styleString() const case DocStyleChange::Div: return "div"; case DocStyleChange::Span: return "span"; case DocStyleChange::Strike: return "strike"; + case DocStyleChange::S: return "s"; case DocStyleChange::Del: return "del"; case DocStyleChange::Underline: return "u"; case DocStyleChange::Ins: return "ins"; @@ -1171,7 +1172,7 @@ static void handleParameterType(DocNode *parent,QList<DocNode> &children,const Q { QCString name = g_token->name; // save token name QCString name1; - int p=0,i,l,ii; + int p=0,i,ii; while ((i=paramTypes.find('|',p))!=-1) { name1 = paramTypes.mid(p,i-p); @@ -1550,6 +1551,15 @@ reparsetoken: handleStyleLeave(parent,children,DocStyleChange::Bold,tokenName); } break; + case HTML_S: + if (!g_token->endTag) + { + handleStyleEnter(parent,children,DocStyleChange::S,&g_token->attribs); + } + else + { + handleStyleLeave(parent,children,DocStyleChange::S,tokenName); + } case HTML_STRIKE: if (!g_token->endTag) { @@ -5925,6 +5935,9 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta case HTML_BOLD: handleStyleEnter(this,m_children,DocStyleChange::Bold,&g_token->attribs); break; + case HTML_S: + handleStyleEnter(this,m_children,DocStyleChange::S,&g_token->attribs); + break; case HTML_STRIKE: handleStyleEnter(this,m_children,DocStyleChange::Strike,&g_token->attribs); break; @@ -6346,6 +6359,9 @@ int DocPara::handleHtmlEndTag(const QCString &tagName) case HTML_BOLD: handleStyleLeave(this,m_children,DocStyleChange::Bold,"b"); break; + case HTML_S: + handleStyleLeave(this,m_children,DocStyleChange::S,"s"); + break; case HTML_STRIKE: handleStyleLeave(this,m_children,DocStyleChange::Strike,"strike"); break; diff --git a/src/docparser.h b/src/docparser.h index e608d8f..4c10d9e 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -385,7 +385,8 @@ class DocStyleChange : public DocNode Strike = (1<<10), Underline = (1<<11), Del = (1<<12), - Ins = (1<<13) + Ins = (1<<13), + S = (1<<14) }; DocStyleChange(DocNode *parent,uint position,Style s,bool enable, diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 79c7d0e..d21f0c9 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"|"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" +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"|"s" +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"|"S" 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 c7fcaf8..f19b5ed 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -406,6 +406,9 @@ void HtmlDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Bold: if (s->enable()) m_t << "<b" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</b>"; break; + case DocStyleChange::S: + if (s->enable()) m_t << "<s" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</s>"; + break; case DocStyleChange::Strike: if (s->enable()) m_t << "<strike" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</strike>"; break; diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index a0bbf73..07ad692 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -291,6 +291,7 @@ void LatexDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Bold: if (s->enable()) m_t << "{\\bfseries{"; else m_t << "}}"; break; + case DocStyleChange::S: case DocStyleChange::Strike: case DocStyleChange::Del: if (s->enable()) m_t << "\\sout{"; else m_t << "}"; diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 997b24e..fe5683b 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -136,6 +136,7 @@ void ManDocVisitor::visit(DocStyleChange *s) if (s->enable()) m_t << "\\fB"; else m_t << "\\fP"; m_firstCol=FALSE; break; + case DocStyleChange::S: case DocStyleChange::Strike: case DocStyleChange::Del: /* not supported */ diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index a288e0e..92670d9 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -639,6 +639,7 @@ void PerlModDocVisitor::visit(DocStyleChange *s) switch (s->style()) { case DocStyleChange::Bold: style = "bold"; break; + case DocStyleChange::S: style = "s"; break; case DocStyleChange::Strike: style = "strike"; break; case DocStyleChange::Del: style = "del"; break; case DocStyleChange::Underline: style = "underline"; break; diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index 6b9bd75..ed4e76b 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -105,6 +105,9 @@ class PrintDocVisitor : public DocVisitor case DocStyleChange::Bold: if (s->enable()) printf("<bold>"); else printf("</bold>"); break; + case DocStyleChange::S: + if (s->enable()) printf("<s>"); else printf("</s>"); + break; case DocStyleChange::Strike: if (s->enable()) printf("<strike>"); else printf("</strike>"); break; diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 43ac362..efb0bc3 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -235,6 +235,7 @@ void RTFDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Bold: if (s->enable()) m_t << "{\\b "; else m_t << "} "; break; + case DocStyleChange::S: case DocStyleChange::Strike: case DocStyleChange::Del: if (s->enable()) m_t << "{\\strike "; else m_t << "} "; diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index a0afa9d..c873de1 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -187,6 +187,9 @@ void XmlDocVisitor::visit(DocStyleChange *s) case DocStyleChange::Bold: if (s->enable()) m_t << "<bold>"; else m_t << "</bold>"; break; + case DocStyleChange::S: + if (s->enable()) m_t << "<s>"; else m_t << "</s>"; + break; case DocStyleChange::Strike: if (s->enable()) m_t << "<strike>"; else m_t << "</strike>"; break; |