Skip to content

Update graph_mermaid.py #31577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update graph_mermaid.py #31577

wants to merge 2 commits into from

Conversation

chgjin
Copy link

@chgjin chgjin commented Jun 12, 2025

This pull request includes a refinement to the _escape_node_label function in libs/core/langchain_core/runnables/graph_mermaid.py. The change improves the handling of special characters in Mermaid syntax by expanding the regex pattern to include additional characters.

Key change:

  • libs/core/langchain_core/runnables/graph_mermaid.py: Updated the _escape_node_label function to use a more comprehensive regex pattern (mermaid_special_chars) for escaping special characters in Mermaid syntax. This ensures better compatibility and avoids issues with unsupported characters.Correct the _escape_node_label method to be compatible with multilingual title names

Correct the `_escape_node_label` method to be compatible with multilingual title names
Copy link

vercel bot commented Jun 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Jun 16, 2025 2:54am

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. Ɑ: core Related to langchain-core 🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs labels Jun 12, 2025
Copy link

codspeed-hq bot commented Jun 12, 2025

CodSpeed Walltime Performance Report

Merging #31577 will not alter performance

Comparing chgjin:patch-1 (800790b) with master (532e645)

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched benchmarks

Copy link

codspeed-hq bot commented Jun 12, 2025

CodSpeed Instrumentation Performance Report

Merging #31577 will not alter performance

Comparing chgjin:patch-1 (800790b) with master (532e645)

Summary

✅ 13 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: core Related to langchain-core 🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant