Skip to content

Commit c0973db

Browse files
committed
dev docs-format: Prevent prettier from automatically formatting code blocks
We have our own code for formatting JSON and cf3. I was seeing an issue where JSON code blocks were getting reformatted even if I marked them as skip / noautoformat. Prettier would "get in the way" by reformatting the JSON code blocks. Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
1 parent 5e7d3c1 commit c0973db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cfengine_cli/docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def _run_prettier(path):
350350
# Wrong: prettier --write **.markdown **.md
351351
# Right: prettier --write '**.markdown' '**.md'
352352
subprocess.run(
353-
["prettier", "--write", *args],
353+
["prettier", "--embedded-language-formatting", "off", "--write", *args],
354354
capture_output=True,
355355
text=True,
356356
check=True,

0 commit comments

Comments
 (0)