version 1.274, 2021/08/10 12:55:03 |
version 1.278, 2022/07/06 14:34:59 |
|
|
/* |
/* |
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011-2015, 2017-2021 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011-2015, 2017-2021 Ingo Schwarze <schwarze@openbsd.org> |
|
* Copyright (c) 2022 Anna Vyalkova <cyber@sysrq.in> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
Line 67 static const struct htmldata htmltags[TAG_MAX] = { |
|
Line 68 static const struct htmldata htmltags[TAG_MAX] = { |
|
{"style", HTML_NLALL | HTML_INDENT}, |
{"style", HTML_NLALL | HTML_INDENT}, |
{"title", HTML_NLAROUND}, |
{"title", HTML_NLAROUND}, |
{"body", HTML_NLALL}, |
{"body", HTML_NLALL}, |
|
{"main", HTML_NLALL}, |
{"div", HTML_NLAROUND}, |
{"div", HTML_NLAROUND}, |
{"section", HTML_NLALL}, |
{"section", HTML_NLALL}, |
|
{"nav", HTML_NLALL}, |
{"table", HTML_NLALL | HTML_INDENT}, |
{"table", HTML_NLALL | HTML_INDENT}, |
{"tr", HTML_NLALL | HTML_INDENT}, |
{"tr", HTML_NLALL | HTML_INDENT}, |
{"td", HTML_NLAROUND}, |
{"td", HTML_NLAROUND}, |
Line 78 static const struct htmldata htmltags[TAG_MAX] = { |
|
Line 81 static const struct htmldata htmltags[TAG_MAX] = { |
|
{"dl", HTML_NLALL | HTML_INDENT}, |
{"dl", HTML_NLALL | HTML_INDENT}, |
{"dt", HTML_NLAROUND}, |
{"dt", HTML_NLAROUND}, |
{"dd", HTML_NLAROUND | HTML_INDENT}, |
{"dd", HTML_NLAROUND | HTML_INDENT}, |
{"h1", HTML_TOPHRASE | HTML_NLAROUND}, |
|
{"h2", HTML_TOPHRASE | HTML_NLAROUND}, |
{"h2", HTML_TOPHRASE | HTML_NLAROUND}, |
|
{"h3", HTML_TOPHRASE | HTML_NLAROUND}, |
{"p", HTML_TOPHRASE | HTML_NLAROUND | HTML_INDENT}, |
{"p", HTML_TOPHRASE | HTML_NLAROUND | HTML_INDENT}, |
{"pre", HTML_TOPHRASE | HTML_NLAROUND | HTML_NOINDENT}, |
{"pre", HTML_TOPHRASE | HTML_NLAROUND | HTML_NOINDENT}, |
{"a", HTML_INPHRASE | HTML_TOPHRASE}, |
{"a", HTML_INPHRASE | HTML_TOPHRASE}, |
Line 91 static const struct htmldata htmltags[TAG_MAX] = { |
|
Line 94 static const struct htmldata htmltags[TAG_MAX] = { |
|
{"span", HTML_INPHRASE | HTML_TOPHRASE}, |
{"span", HTML_INPHRASE | HTML_TOPHRASE}, |
{"var", HTML_INPHRASE | HTML_TOPHRASE}, |
{"var", HTML_INPHRASE | HTML_TOPHRASE}, |
{"br", HTML_INPHRASE | HTML_NOSTACK | HTML_NLALL}, |
{"br", HTML_INPHRASE | HTML_NOSTACK | HTML_NLALL}, |
|
{"hr", HTML_INPHRASE | HTML_NOSTACK}, |
{"mark", HTML_INPHRASE }, |
{"mark", HTML_INPHRASE }, |
{"math", HTML_INPHRASE | HTML_NLALL | HTML_INDENT}, |
{"math", HTML_INPHRASE | HTML_NLALL | HTML_INDENT}, |
{"mrow", 0}, |
{"mrow", 0}, |
Line 706 print_otag(struct html *h, enum htmltag tag, const cha |
|
Line 710 print_otag(struct html *h, enum htmltag tag, const cha |
|
break; |
break; |
case 'i': |
case 'i': |
attr = "id"; |
attr = "id"; |
|
break; |
|
case 'r': |
|
attr = "role"; |
break; |
break; |
case '?': |
case '?': |
attr = arg1; |
attr = arg1; |