The file/wire format can, but the official implementation doesn't handle it well. There is some work in progress to make it work, for this kind of historical work.
There is a project doing exactly this for German law.[1] I also once cobbled together a rather primitive Python script which commits Swiss federal law as MD-file into a repo through GitHub actions.[2]