Created
December 30, 2020 16:28
-
-
Save matthewdeanmartin/385975ead047c4d45b3bbd4121a8705d to your computer and use it in GitHub Desktop.
Markdown lint... next step is to "lint" the English with spell check, grammar check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# npm install [email protected] -g | |
# npm install -g markdownlint-cli | |
echo "running tidy-markdown (a node.js package)" | |
tidy-markdown<README.md >README.fix.md | |
rm README.md | |
mv README.fix.md README.md | |
echo "running markdownlint (a node.js package)" | |
markdownlint '**/*.md' --ignore node_modules | |
retVal=$? | |
if [ $retVal -ne 0 ]; then | |
echo Failed | |
kill -INT $$ | |
return | |
fi | |
# pip install Markdown | |
echo "Checking if the file can be parsed into HTML" | |
markdown_py README.md | |
retVal=$? | |
if [ $retVal -ne 0 ]; then | |
echo Failed | |
kill -INT $$ | |
return | |
fi | |
# pip install Markdown2 | |
echo "Checking if the file can be parsed into HTML, alternative parser" | |
markdown2 README.md | |
retVal=$? | |
if [ $retVal -ne 0 ]; then | |
echo Failed | |
kill -INT $$ | |
return | |
fi | |
# pip install Commonmark | |
echo "Checking if the file can be parsed into HTML, Commonmark parser" | |
cmark README.md | |
retVal=$? | |
if [ $retVal -ne 0 ]; then | |
echo Failed | |
kill -INT $$ | |
return | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment