From f380f5d946b2f2cfd7fe6094b7a07e9e2c53ff0b Mon Sep 17 00:00:00 2001 From: Florian Rathgeber Date: Sat, 14 Dec 2024 07:42:22 +0100 Subject: [PATCH] Add note about argument quoting for pre-commit hook to README See discussion in #119. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 2d900e4..4ba04cd 100644 --- a/README.md +++ b/README.md @@ -453,6 +453,16 @@ to the `.pre-commit-config.yaml` in your repository: Then run `pre-commit install` to activate the hook. +When passing parameters to the hook, be aware that arguments with spaces such as +`--extra-keys` need to be quoted as a whole: + + repos: + - repo: https://github.com/kynan/nbstripout + rev: 0.8.1 + hooks: + - id: nbstripout + args: ['--extra-keys="metadata.celltoolbar cell.metadata.heading_collapsed"'] + > [!WARNING] > > In this mode, `nbstripout` is used as a git hook to strip any `.ipynb` files