diff options
Diffstat (limited to 'docs/Makefile')
| -rw-r--r-- | docs/Makefile | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/Makefile b/docs/Makefile index 2b44830531..d97a7ff07c 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -49,6 +49,7 @@ help: @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " spelling to check for typos in documentation" + @echo " black to apply the black formatting to code blocks in documentation" clean: @@ -165,3 +166,10 @@ spelling: @echo @echo "Check finished. Wrong words can be found in " \ "$(BUILDDIR)/spelling/output.txt." + +black: + @mkdir -p $(BUILDDIR)/black + find -name "*.txt" -not -path "./_build/*" -not -path "./_theme/*" \ + | xargs blacken-docs --rst-literal-block; echo $$? > "$(BUILDDIR)/black/output.txt" + @echo + @echo "Code blocks reformatted" |
