Skip to content

Commit d44ce6d

Browse files
committed
Doc: fix Asciidoctor css workaround
The previous step introduced docinfo.html to be used to tweak the CSS used by the asciidoctor, that by default renders <code> inside <pre> as a block element, breaking the SYNOPSIS section of a few pages that adopted a new convention we use since Git 2.45. But in this project, HTML files are all generated. We do not force any human to write HTML by hand, which is an unusual and cruel punishment. "*.html" is in the .gitignore file, and "make clean" removes them. Having a tracked .html file makes "make clean" make the tree dirty by removing the tracked docinfo.html file. Let's do an obvious, minimum and stupid workaround to generate that file at runtime instead. The mark-up is being rethought in a major way for the next development cycle, and the CSS workaround we added in the previous step may have to adjusted, possibly in a large way, anyway. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8bfc3e4 commit d44ce6d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Documentation/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
*.xml
22
*.html
3-
!/docinfo.html
43
*.[1-8]
54
*.made
65
*.texi

Documentation/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ XMLTO_EXTRA += --skip-validation
209209
XMLTO_EXTRA += -x manpage.xsl
210210
endif
211211

212+
ASCIIDOC_DEPS += docinfo.html
213+
212214
SHELL_PATH ?= $(SHELL)
213215
# Shell quote;
214216
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
@@ -337,6 +339,9 @@ clean:
337339
$(RM) $(cmds_txt) $(mergetools_txt) *.made
338340
$(RM) GIT-ASCIIDOCFLAGS
339341

342+
docinfo.html: docinfo-html.in
343+
$(QUIET_GEN)$(RM) $@ && cat $< >$@
344+
340345
$(MAN_HTML): %.html : %.txt $(ASCIIDOC_DEPS)
341346
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) -d manpage -o $@ $<
342347

File renamed without changes.

0 commit comments

Comments
 (0)