소스 검색

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

Fabian Peter Hammerle 1 년 전
부모
커밋
62f1859899
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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