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:
parent
1f56f68448
commit
04272c3973
@ -13,6 +13,7 @@ information about the defined products without actually running any build steps.
|
|||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
import functools
|
import functools
|
||||||
|
import itertools
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
@ -559,7 +560,8 @@ def replace_private_people(initialer: Callable[[str], str] = None, replace_link_
|
|||||||
assert 'public_wiki_folder' in build_state
|
assert 'public_wiki_folder' in build_state
|
||||||
|
|
||||||
replacement_table = _private_people_replacement_table(initialer)
|
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:
|
for tiddler in tid_files:
|
||||||
dirty = False
|
dirty = False
|
||||||
|
Loading…
Reference in New Issue
Block a user