- add Local Render Mermaid - add page-starе для указания смещения страниц - add Гиперссылки в документе на списки литературы
This commit is contained in:
@@ -356,6 +356,9 @@ def test_render_mermaid_skips_jar(tmp_path):
|
||||
calls["jar"] += 1
|
||||
return False
|
||||
|
||||
def fake_local(*args, **kwargs):
|
||||
return False
|
||||
|
||||
def fake_kroki(source, diagram_type, base_url, out_path, fmt="png"):
|
||||
calls["kroki"].append((diagram_type, fmt, base_url))
|
||||
if fmt == "png":
|
||||
@@ -366,6 +369,7 @@ def test_render_mermaid_skips_jar(tmp_path):
|
||||
|
||||
configure_diagrams(fallback="remote", cache_dir=str(tmp_path))
|
||||
with patch("md2gost.diagram_renderer._render_plantuml_jar", side_effect=fake_jar), \
|
||||
patch("md2gost.mermaid_renderer.write_mermaid_outputs", side_effect=fake_local), \
|
||||
patch("md2gost.diagram_renderer._render_kroki", side_effect=fake_kroki):
|
||||
result = render_diagram("mermaid", "flowchart LR\nA-->B", cache_dir=str(tmp_path))
|
||||
assert calls["jar"] == 0
|
||||
|
||||
Reference in New Issue
Block a user