@@ -86,13 +86,16 @@ const PROSE_RULES = [
8686// `dfx` is banned in this repo (AGENTS.md "Never"), and a command reaches a
8787// reader from inside a fence, where the prose rules deliberately do not go. Only
8888// this exact shape is rewritten, checked against `icp canister call` in icp-cli
89- // v1.5.0: <CANISTER> accepts a principal, `-e` selects the network, and the
90- // argument has to be written out, because `icp canister call` with no argument
91- // opens an interactive prompt instead of sending an empty one. dfx infers `()`;
92- // icp does not, so the rewrite adds it. Any other `dfx` occurrence fails the
93- // sync rather than being guessed at.
89+ // v1.5.0: <CANISTER> accepts a principal, and the argument has to be written
90+ // out, because `icp canister call` with no argument opens an interactive prompt
91+ // instead of sending an empty one. dfx infers `()`; icp does not, so the rewrite
92+ // adds it. `--network ic` becomes `-n ic`, which names a network the way dfx's
93+ // flag does. The environment flag is not the translation: `-e` resolves a
94+ // canister name out of a local project, and these pages target a canister by
95+ // principal, from wherever the reader happens to be. Any other `dfx` occurrence
96+ // fails the sync rather than being guessed at.
9497const DFX_CALL = / ^ ( \s * ) d f x c a n i s t e r c a l l ( \S + ) ( \S + ) - - n e t w o r k i c [ \t ] * $ / gm;
95- const rewriteDfx = ( text ) => text . replace ( DFX_CALL , "$1icp canister call $2 $3 '()' -e ic" ) ;
98+ const rewriteDfx = ( text ) => text . replace ( DFX_CALL , "$1icp canister call $2 $3 '()' -n ic" ) ;
9699
97100// Prose means prose: not a fenced block, not the frontmatter, and within a line,
98101// not an inline code span and not a link destination. A rule that reached into
0 commit comments