Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/parser: Add missing closing div tag #2523

Merged
merged 2 commits into from
Aug 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/Make/HtmlRules.make
Original file line number Diff line number Diff line change
@@ -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 '</body>\|</html>' > $(2))
htmldesc = $(call run_grass,$(1) --html-description < /dev/null | grep -v '</body>\|</html>\|</div> <!-- end container -->' > $(2))

IMGSRC := $(wildcard *.png) $(wildcard *.jpg) $(wildcard *.gif)
IMGDST := $(patsubst %,$(HTMLDIR)/%,$(IMGSRC))
Expand Down
1 change: 1 addition & 0 deletions lib/gis/parser_html.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ void G__usage_html(void)
}
fprintf(stdout, "</div>\n");

fprintf(stdout, "</div> <!-- end container -->\n");
fprintf(stdout, "</body>\n</html>\n");
}

Expand Down
5 changes: 4 additions & 1 deletion utils/mkhtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("</body>|</html>", line, re.IGNORECASE):
# The cleanup happens on Makefile level too.
if not re.search(
"</body>|</html>|</div> <!-- end container -->", line, re.IGNORECASE
):
sys.stdout.write(line)

# create TOC
Expand Down