Avoid stray '<!DOCTYPE>' text.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 11 Jan 2020 11:21:47 +0000 (12:21 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 11 Jan 2020 11:21:47 +0000 (12:21 +0100)
The markdown converter converts the doctype header into html which
results in a stray line at the top of the chapter. This only affects
the chapters that still use markdown: Bash, Git, Command Line
Utilities, and Gridengine.

This patch applies a silly workaround. In the long run, the chapters
should be converted to plain html.

Makefile

index d210e2bfdeaf5c409a5ca4c9fda1a07ffdb57ca9..14357e80c7ed36e6914382433a202cdbc3530905 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,8 @@ $(DEST):
 
 # m4 -> html
 
-MD_CMD = m4 $(M4_ARGS) $< | markdown -f tables,links > $@
+MD_CMD = m4 $(M4_ARGS) $< | sed -e '1,/^<html lang="en">/d' \
+       | markdown -f tables,links > $@
 
 $(DEST)/Bash.html: Bash.m4 $(MACROS) | $(DEST)
        $(MD_CMD)