Skip to content

Commit e78ef43

Browse files
jensmaurertkoeppe
authored andcommitted
[check] Improve detection of missing concept markup
1 parent 6e1d718 commit e78ef43

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tools/check-output.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,21 @@ cat std-conceptindex.ind |
6464
# Find undecorated concept names in code blocks
6565
patt="`cat std-conceptindex.ind |
6666
sed 's/.hyperindexformat/\nhyperindexformat/;s/.hyperpage/\nhyperpage/' |
67-
sed -n 's/^ .item.*{\([-a-z_]*\)}.*$/\1/p'`"
67+
sed -n 's/^ .item.*{\([-a-z_]*\)}.*$/\1/p;s/^ .item.*frenchspacing \([a-z_]*\)}.*$/\1/p'`"
6868

6969
patt="`echo $patt | sed 's/ /\\\\|/g'`"
7070
# $patt contains all concept names, separated by \| to use as a sed regex
7171

7272
for f in *.tex; do
73-
sed -n 's,//.*$,,;s/%.*$//;s/"[^"]*"/""/;/begin{codeblock\(tu\)\?}/,/end{codeblock\(tu\)\?}/{/[^-_{a-z\]\('"$patt"'\)[^-_}a-z();]/{=;p;};}' $f |
73+
# handle codeblock
74+
sed -n 's,//.*$,,;s/%.*$//;s/"[^"]*"/""/;/begin{codeblock\(tu\)\?}/,/end{codeblock\(tu\)\?}/{/[^-_a-z\]\('"$patt"'\)[^-_}a-z0-9();,]/{=;p;};}' $f |
75+
# prefix output with filename and line
76+
sed '/^[0-9]\+$/{N;s/\n/:/;}' | sed "s/.*/$f:&/" |
77+
grep -v "@.seebelow" |
78+
sed "s/\$/ -- concept name without markup/" |
79+
fail || failed=1
80+
# handle itemdecl
81+
sed -n 's,//.*$,,;s/%.*$//;s/"[^"]*"/""/;/begin{itemdecl}/,/end{itemdecl}/{/[^-_a-z]\('"$patt"'\)[^-_a-z();,]/{/concept{[a-z_-]*}/d;=;p;};}' $f |
7482
# prefix output with filename and line
7583
sed '/^[0-9]\+$/{N;s/\n/:/;}' | sed "s/.*/$f:&/" |
7684
grep -v "@.seebelow" |

0 commit comments

Comments
 (0)