Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5b7da5c

Browse files
committed
Doc: add check to detect non-breaking spaces in the docs.
There were multiple instances where accidentally adding non-breakingspace (nbsp, U+00A0, 0xc2a0 in UTF-8) to sgml files. This commit addsadditional checking to detect nbsp. You can check the nbsp by:make -C doc/src/sgml checkormake -C doc/src/sgml check-nbspAuthors: Yugo Nagata, Daniel GustafssonReviewed-by: Tatsuo Ishii, Daniel GustafssonDiscussion:https://postgr.es/m/20240930.153404.202479334310259810.ishii%40postgresql.org
1 parenta39297e commit5b7da5c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎doc/src/sgml/Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ MAKEINFO = makeinfo
194194
##
195195

196196
# Quick syntax check without style processing
197-
check: postgres.sgml$(ALLSGML) check-tabs
197+
check: postgres.sgml$(ALLSGML) check-tabs check-nbsp
198198
$(XMLLINT)$(XMLINCLUDE) --noout --valid$<
199199

200200

@@ -257,7 +257,15 @@ endif # sqlmansectnum != 7
257257

258258
# tabs are harmless, but it is best to avoid them in SGML files
259259
check-tabs:
260-
@(! grep''$(wildcard$(srcdir)/*.sgml$(srcdir)/ref/*.sgml$(srcdir)/*.xsl) )|| (echo"Tabs appear in SGML/XML files"1>&2;exit 1)
260+
@(! grep''$(wildcard$(srcdir)/*.sgml$(srcdir)/ref/*.sgml$(srcdir)/*.xsl) )||\
261+
(echo"Tabs appear in SGML/XML files"1>&2;exit 1)
262+
263+
# Non-breaking spaces are harmless, but it is best to avoid them in SGML files.
264+
# Use perl command because non-GNU grep or sed could not have hex escape sequence.
265+
check-nbsp:
266+
@ ($(PERL) -ne'/\xC2\xA0/ and print("$$ARGV:$$_"),$$n++; END {exit($$n>0)}' \
267+
$(wildcard$(srcdir)/*.sgml$(srcdir)/ref/*.sgml$(srcdir)/*.xsl) )||\
268+
(echo"Non-breaking spaces appear in SGML/XML files"1>&2;exit 1)
261269

262270
##
263271
## Clean

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp