check for any ASCII tabs anywhere in markdown files
Clarified and simplified the request to not use ASCII tabs within markdown file content. Added _guidelines_ to `next/guidelines.md` about not using ASCII tab characters in markdown files while stating that is just fine to use ASCII tabs in non-markdown files and C code. The `make tab_check` rule now simply checks for ASCII tabs within markdown files, except `markdown.md` where they are required to serve as examples of what not to do. Perform `make quick_www` to perform the above and test under macOS. Perform `make www` to perform the above and test under macOS.
This commit is contained in:
1 parent
836d5308f4
commit
51130083c4
5 files changed
+120
-71
No files matched your search
@@ -277,7 +277,7 @@ help:
|
||||
@echo
|
||||
@echo '# Rules for building a local copy of the IOCCC website:'
|
||||
@echo
|
||||
@echo 'make tab_check - check for leading ASCII tabs in leading whitespace in markdown files'
|
||||
@echo 'make tab_check - check for ASCII tabs in markdown files'
|
||||
@echo 'make genpath - form top level .top, YYYY level .year and winner .path files'
|
||||
@echo 'make genfilelist - generate YYYY level .filelist'
|
||||
@echo 'make verify_entry_files - check to be sure all files in all entries exist'
|
||||
@@ -317,12 +317,13 @@ help:
|
||||
# verify that there are no leading ASCII tabs in leading whitespace in markdown files
|
||||
tab_check:
|
||||
@echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-='
|
||||
@LEADING_TAB_LIST="$$(find * \( -name NOTES -o -name tmp \) -prune -o -type f -name '*.md' -print0 | \
|
||||
xargs -0 grep -E -l '^ *\t')"; \
|
||||
if [[ -n $$LEADING_TAB_LIST ]]; then \
|
||||
echo "$@: ERROR: leading ASCII tab found in leading whitespace in markdown file(s)" 1>&2 ; \
|
||||
@TAB_LIST="$$(find * \( -name NOTES -o -name tmp -o -name markdown.md \) -prune -o \
|
||||
-type f -name '*.md' -print0 | \
|
||||
xargs -0 grep -E -l '\t')"; \
|
||||
if [[ -n $$TAB_LIST ]]; then \
|
||||
echo "$@: ERROR: ASCII tab found in markdown file(s)" 1>&2 ; \
|
||||
echo "$0: Warning: list of offending markdown file(s) starts below" 1>&2 ; \
|
||||
echo "$${LEADING_TAB_LIST}" 1>&2 ; \
|
||||
echo "$${TAB_LIST}" 1>&2 ; \
|
||||
echo "$0: Warning: list of offending markdown file(s) ends above" 1>&2 ; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user