Files
NotesAgentic/backend/app/plot/__init__.py
T
yxxandClaude Code f49d1245a1 feat(export): 函数图像静态渲染(function-plot → SVG)
- 新增 app/plot 包:白名单表达式解析(ast 无 eval)+ FunctionPlot 模型 + 静态 SVG 渲染
- HtmlExporter 的 function_plot 节点解析并内嵌 SVG,解析失败回退占位并转诊断
- 新增 test_plot.py(13 个测试)覆盖表达式安全、指令解析、SVG 输出与导出链路集成

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-04 22:41:35 +08:00

8 lines
374 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Function Plot:函数图像的白名单表达式解析与静态 SVG 渲染。
模块划分:
- model.py FunctionPlot 等内部数据模型(不进 contracts.py,同 Document AST
- parser.py function-plot 源码与表达式解析(ast 白名单,绝不 eval/exec
- render.py 把 FunctionPlot 渲染为内嵌 SVG(纯几何 + <text>,无脚本)
"""