summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2014-09-28 11:33:15 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2014-09-28 11:33:15 +0000
commitffb8ed4f9bbbf465632bd651b71377fa7d058dd3 (patch)
tree5e846e729104107f5b32f07225084e95d12f1025
parent7dc17b8921adee9171abb89dd4bf5a994182c0ae (diff)
downloadmandoc-ffb8ed4f9bbbf465632bd651b71377fa7d058dd3.tar.gz
Add support for some MathML elements and attributes in our HTML5.
-rw-r--r--html.c15
-rw-r--r--html.h15
2 files changed, 30 insertions, 0 deletions
diff --git a/html.c b/html.c
index c22a86dc..2f7d3464 100644
--- a/html.c
+++ b/html.c
@@ -74,6 +74,19 @@ static const struct htmldata htmltags[TAG_MAX] = {
{"code", 0 }, /* TAG_CODE */
{"small", 0 }, /* TAG_SMALL */
{"style", HTML_CLRLINE}, /* TAG_STYLE */
+ {"math", HTML_CLRLINE}, /* TAG_MATH */
+ {"mrow", 0}, /* TAG_MROW */
+ {"mi", 0}, /* TAG_MI */
+ {"mo", 0}, /* TAG_MO */
+ {"msup", 0}, /* TAG_MSUP */
+ {"msub", 0}, /* TAG_MSUB */
+ {"msubsup", 0}, /* TAG_MSUBSUP */
+ {"mfrac", 0}, /* TAG_MFRAC */
+ {"msqrt", 0}, /* TAG_MSQRT */
+ {"mfenced", 0}, /* TAG_MFENCED */
+ {"mtable", 0}, /* TAG_MTABLE */
+ {"mtr", 0}, /* TAG_MTR */
+ {"mtd", 0}, /* TAG_MTD */
};
static const char *const htmlattrs[ATTR_MAX] = {
@@ -87,6 +100,8 @@ static const char *const htmlattrs[ATTR_MAX] = {
"id", /* ATTR_ID */
"colspan", /* ATTR_COLSPAN */
"charset", /* ATTR_CHARSET */
+ "open", /* ATTR_OPEN */
+ "close", /* ATTR_CLOSE */
};
static const char *const roffscales[SCALE_MAX] = {
diff --git a/html.h b/html.h
index 21c924b0..bd576ceb 100644
--- a/html.h
+++ b/html.h
@@ -50,6 +50,19 @@ enum htmltag {
TAG_CODE,
TAG_SMALL,
TAG_STYLE,
+ TAG_MATH,
+ TAG_MROW,
+ TAG_MI,
+ TAG_MO,
+ TAG_MSUP,
+ TAG_MSUB,
+ TAG_MSUBSUP,
+ TAG_MFRAC,
+ TAG_MSQRT,
+ TAG_MFENCED,
+ TAG_MTABLE,
+ TAG_MTR,
+ TAG_MTD,
TAG_MAX
};
@@ -64,6 +77,8 @@ enum htmlattr {
ATTR_ID,
ATTR_COLSPAN,
ATTR_CHARSET,
+ ATTR_OPEN,
+ ATTR_CLOSE,
ATTR_MAX
};