From 4d9a6e605fa99bd0ff0a5aed6ed07696f02e2e16 Mon Sep 17 00:00:00 2001 From: Vaclav Petras Date: Sun, 28 Aug 2022 08:21:16 -0400 Subject: [PATCH] lib/parser: Add missing closing div tag (#2523) End of file is being added both in parser and also in mkhtml because it is removed so that documentation can be just appended. This marks the closing tag with a comment so that the right line is removed. (An ultimate solution is moving to more template-like replacement instead of the current file append.) --- include/Make/HtmlRules.make | 2 +- lib/gis/parser_html.c | 1 + utils/mkhtml.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/Make/HtmlRules.make b/include/Make/HtmlRules.make index ed9f65501bd..0c79a05a2ad 100644 --- a/include/Make/HtmlRules.make +++ b/include/Make/HtmlRules.make @@ -1,7 +1,7 @@ # common html rules (included by Html.make and GuiScript.make) -htmldesc = $(call run_grass,$(1) --html-description < /dev/null | grep -v '\|' > $(2)) +htmldesc = $(call run_grass,$(1) --html-description < /dev/null | grep -v '\|\| ' > $(2)) IMGSRC := $(wildcard *.png) $(wildcard *.jpg) $(wildcard *.gif) IMGDST := $(patsubst %,$(HTMLDIR)/%,$(IMGSRC)) diff --git a/lib/gis/parser_html.c b/lib/gis/parser_html.c index 7ee8b14a567..304edeea4df 100644 --- a/lib/gis/parser_html.c +++ b/lib/gis/parser_html.c @@ -295,6 +295,7 @@ void G__usage_html(void) } fprintf(stdout, "\n"); + fprintf(stdout, " \n"); fprintf(stdout, "\n\n"); } diff --git a/utils/mkhtml.py b/utils/mkhtml.py index 47021cbb8cc..6056a747364 100644 --- a/utils/mkhtml.py +++ b/utils/mkhtml.py @@ -687,7 +687,10 @@ def get_addon_path(): sys.stdout.write(header_tmpl.substitute(PGM=pgm, PGM_DESC=pgm_desc)) if tmp_data: for line in tmp_data.splitlines(True): - if not re.search("|", line, re.IGNORECASE): + # The cleanup happens on Makefile level too. + if not re.search( + "|| ", line, re.IGNORECASE + ): sys.stdout.write(line) # create TOC