aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-04-07 15:30:32 +0200
committerJonas Smedegaard <dr@jones.dk>2024-04-07 15:30:32 +0200
commite06cce16b73feddb8e41d6a7f90899267077baff (patch)
treec9077a9026d2ab48913f8b6ca05e5f7636f94359
parent8a3cde20a3164fa38cd045c829dc78364553d3cc (diff)
add make targets lint lint-markdown
-rw-r--r--.mdl.rb6
-rw-r--r--Makefile7
2 files changed, 13 insertions, 0 deletions
diff --git a/.mdl.rb b/.mdl.rb
new file mode 100644
index 0000000..6dbc8f3
--- /dev/null
+++ b/.mdl.rb
@@ -0,0 +1,6 @@
+all
+rule 'MD003', :style => :atx
+rule 'MD004', :style => :asterisk
+rule 'MD007', :indent => 4
+rule 'MD013', :ignore_code_blocks => true, :tables => true
+rule 'MD035', :style => '---'
diff --git a/Makefile b/Makefile
index 1ceadaf..f1fdf60 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,8 @@ ARTICLES = learn code use worlding
PERL_FILES = bin/hedgedoc2quarto bin/xmp2rdfxml
+TIDY_MARKDOWN = worlding
+
export HEDGEDOC_COOKIES_FILE = $(CURDIR)/cookies.txt
export HEDGEDOC_SERVER = https://pad.degrowth.net/
@@ -76,6 +78,11 @@ $(ARTICLES:%=pad-import-%): pad-import-%:
pad-import-ref:
hedgedoc import ref.bib
+lint: lint-markdown
+
+lint-markdown:
+ mdl --ignore-front-matter --style .mdl.rb $(addsuffix /*.qmd,$(TIDY_MARKDOWN))
+
tidy: tidy-bibtex tidy-perl
tidy-bibtex: