Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-09-22 23:44:06 +0300
committerRich Trott <rtrott@gmail.com>2021-09-25 20:23:20 +0300
commit6077473111cfb95981620885cdc9c081d40e1ff6 (patch)
treee265de850316bed3cb0b97a54950b2254f15dca0 /vcbuild.bat
parentb0ef0807e01856d1c0b06e7888bcbdb7380c8fbd (diff)
tools: implement markdown formatting
Markdown formatter is now available via `mark format-md` (or `vcbuild format-md` on Windows). PR-URL: https://github.com/nodejs/node/pull/40181 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat14
1 files changed, 14 insertions, 0 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index ec30fca533a..604843027cb 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -726,6 +726,20 @@ for /D %%D IN (doc\*) do (
ENDLOCAL
goto exit
+:format-md
+if not defined lint_md goto exit
+echo Running Markdown formatter on docs...
+SETLOCAL ENABLEDELAYEDEXPANSION
+set lint_md_files=
+for /D %%D IN (doc\*) do (
+ for %%F IN (%%D\*.md) do (
+ set "lint_md_files="%%F" !lint_md_files!"
+ )
+)
+%node_exe% tools\lint-md\lint-md.mjs --format %lint_md_files%
+ENDLOCAL
+goto exit
+
:create-msvs-files-failed
echo Failed to create vc project files.
del .used_configure_flags