2 # Checks for potential errors in articles.
4 echo "===== trailing spaces:"
7 echo "===== links not ending in .md:"
8 grep -rno "\[[^]]*\]([^)]*\([^.)][^)][^)]\|[^)][^m)][^)]\|[^)][^)][^d)]\))" *.md
11 typos
="${typos}pubic|noticabl|occassion|ocassion|occure|occurres|adress"
12 typos
="${typos}agressi|aggresi|aparrent|apparrent|concensu|definat|dissapoint|"
13 typos
="${typos}dissappoint|disasterous|lmoa|cathegor|comming|commited|comitted"
14 typos
="${typos}embarass|embarrasi|excede|harrass|harrase|fullfil|immitat|"
15 typos
="${typos}taht|lightening|milleni|milenni|miniscule|mispell|neccessar|"
16 typos
="${typos}necces|occasionaly|occurrance|occurence|passtime|posess|"
17 typos
="${typos}possese|preceed|priviledge|reccom|refered|succesful|sucessful|"
18 typos
="${typos}errorne|erorrne|superced|tommor|vaccu|wierd|wellfare|acknoleg"
19 typos
="${typos}aparrent|collegue|deppres"
22 echo "===== common typos:"
23 grep -rnoEi $typos *.md
25 echo "===== bad first headings:"
27 secondChar
=`grep -m 1 "^#.*" $f | head -c 2 | tail -c 1`
29 if [ "$secondChar" = "#" ]; then