Merge "Extend HTML formatting check (r5, r6, dsR6)"

This commit is contained in:
Zuul 2022-04-28 13:22:52 +00:00 committed by Gerrit Code Review
commit 171377433c
1 changed files with 2 additions and 2 deletions

View File

@ -32,10 +32,10 @@ if [ ${#INCLUDE_FILES[@]} != 0 ]; then
fi
echo "Checking for unexpanded substitution errors in output ..."
INCLUDE_FILES=( $(grep -rl --include="*.html" --exclude="doc_contribute_guide.html" ' |\S\+| ' .) )
INCLUDE_FILES=( $(grep -rlo --include="*.html" --exclude="doc_contribute_guide.html" '[>\s]|\S\+|[<\s]' .) )
if [ ${#INCLUDE_FILES[@]} != 0 ]; then
echo -e "Found ${#INCLUDE_FILES[@]} HTML file(s) that may have unexpanded substitution(s):\n${RED}"
grep -r --include="*.html" --exclude="doc_contribute_guide.html" ' |\S\+| ' . | awk -F: '{if(f!=$1)print ""; f=$1; print $0;}'
grep -ro --include="*.html" --exclude="doc_contribute_guide.html" '[>\s]|\S\+|[<\s]' . | awk -F: '{if(f!=$1)print ""; f=$1; print $0;}'
echo -e "${NC}\nCorrect the issue(s) in the corresponding rST file(s).\nHINT: Substitions are not allowed in code blocks, :ref:s,\n:doc:s, or within rST markup such as **, \`\`, and so on."
error=1
fi