also privatize JSON tiddlers

This seems slightly dangerous because we're just applying the same
replacement logic and JSON has a much fussier syntax. However, if any
tiddlers end up invalid we should just get a build failure, so this
doesn't seem highly consequential.
This commit is contained in:
Soren I. Bjornstad 2022-08-19 17:14:06 -05:00
parent 1f56f68448
commit 04272c3973

View File

@ -13,6 +13,7 @@ information about the defined products without actually running any build steps.
from collections.abc import Mapping
from contextlib import contextmanager
import functools
import itertools
import os
from pathlib import Path
import re
@ -559,7 +560,8 @@ def replace_private_people(initialer: Callable[[str], str] = None, replace_link_
assert 'public_wiki_folder' in build_state
replacement_table = _private_people_replacement_table(initialer)
tid_files = (Path(build_state['public_wiki_folder']) / "tiddlers").glob("**/*.tid")
root = (Path(build_state['public_wiki_folder']) / "tiddlers")
tid_files = itertools.chain(root.glob("**/*.tid"), root.glob("**/*.json"))
for tiddler in tid_files:
dirty = False