Skip to content

Commit 5da68b7

Browse files
committed
dev format-docs: 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 17277bb commit 5da68b7

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
@@ -349,7 +349,7 @@ def _run_prettier(path):
349349
# Wrong: prettier --write **.markdown **.md
350350
# Right: prettier --write '**.markdown' '**.md'
351351
subprocess.run(
352-
["prettier", "--write", *args],
352+
["prettier", "--embedded-language-formatting", "off", "--write", *args],
353353
capture_output=True,
354354
text=True,
355355
check=True,

0 commit comments

Comments
 (0)