Browse Source

filter "ipynb": replace non-persistent value of widget's `model_id` field with `null`

Fabian Peter Hammerle 1 year ago
parent
commit
62f1859899
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gitconfig

+ 1 - 1
gitconfig

@@ -46,7 +46,7 @@
 	textconv = zcat
 
 [filter "ipynb"]
-	clean = jq --indent 1 '.cells[].id = null'
+	clean = jq --indent 1 '.cells[].id? = null | (.cells[].outputs[].data[\"application/vnd.jupyter.widget-view+json\"]|objects|select(has(\"model_id\"))).model_id |= null'
 
 [filter "lfs"]
 	clean = git-lfs clean -- %f