* mandoc: skip printing the embedded style sheet if an external style is
@ 2018-05-01 23:37 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-05-01 23:37 UTC (permalink / raw)
To: source
Log Message:
-----------
skip printing the embedded style sheet if an external style is referenced
Modified Files:
--------------
mandoc:
html.c
Revision Data
-------------
Index: html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/html.c,v
retrieving revision 1.221
retrieving revision 1.222
diff -Lhtml.c -Lhtml.c -u -p -r1.221 -r1.222
--- html.c
+++ html.c
@@ -168,9 +168,14 @@ print_gen_head(struct html *h)
struct tag *t;
print_otag(h, TAG_META, "?", "charset", "utf-8");
+ if (h->style != NULL) {
+ print_otag(h, TAG_LINK, "?h??", "rel", "stylesheet",
+ h->style, "type", "text/css", "media", "all");
+ return;
+ }
/*
- * Print a default style-sheet.
+ * Print a minimal embedded style sheet.
*/
t = print_otag(h, TAG_STYLE, "");
@@ -182,10 +187,6 @@ print_gen_head(struct html *h)
print_endline(h);
print_text(h, "div.Pp { margin: 1ex 0ex; }");
print_tagq(h, t);
-
- if (h->style)
- print_otag(h, TAG_LINK, "?h??", "rel", "stylesheet",
- h->style, "type", "text/css", "media", "all");
}
static void
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-01 23:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 23:37 mandoc: skip printing the embedded style sheet if an external style is schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).