mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-27 23:25:18 +00:00
Updated Wiki content
@@ -236,6 +236,11 @@ def update_mkdocs_yml(mkdocs_path: Path, nav_yaml: str) -> None:
|
|||||||
try:
|
try:
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
# First try strict safe_load; if Python tags are present, fall back to a
|
||||||
|
# constrained loader that only permits the mermaid formatter tag.
|
||||||
|
try:
|
||||||
|
yaml.safe_load(new_content)
|
||||||
|
except yaml.constructor.ConstructorError:
|
||||||
class IgnoreUnknownSafeLoader(yaml.SafeLoader):
|
class IgnoreUnknownSafeLoader(yaml.SafeLoader):
|
||||||
"""Safe loader that allows specific custom tags used in mkdocs.yml."""
|
"""Safe loader that allows specific custom tags used in mkdocs.yml."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user