Skip to content

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
Project Deployment Preview Comments Updated (UTC)
langchain ⬜️ Ignored Preview Aug 11, 2025 10:38pm

@dosubot dosubot bot added size:XS 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 (1bb1095) with master (166c027)

⚠️ 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 (1bb1095) with master (166c027)

Summary

✅ 14 untouched benchmarks

@mdrxy mdrxy changed the title Update graph_mermaid.py feat(core): update graph_mermaid.py Jul 16, 2025
@mdrxy mdrxy requested a review from eyurtsev as a code owner July 16, 2025 15:37
Copy link
Collaborator

@mdrxy mdrxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be worried about removing all non-alphanumerics (including Unicode) but since this is scoped to mermaid and private it LGTM. cc: @eyurtsev for final approval

@mdrxy
Copy link
Collaborator

mdrxy commented Jul 16, 2025

@chgjin can you update test_graph_mermaid_escape_node_label to pass the test to reflect the new foo_bar? see this

@mdrxy mdrxy assigned mdrxy and eyurtsev and unassigned mdrxy Jul 16, 2025
@mdrxy mdrxy added the core Related to the package `langchain-core` label Aug 7, 2025
@mdrxy mdrxy changed the title feat(core): update graph_mermaid.py feat(core): update graph_mermaid.py Aug 7, 2025
@mdrxy
Copy link
Collaborator

mdrxy commented Aug 11, 2025

@chgjin please update to resolve CI failures 🙏

@eyurtsev
Copy link
Collaborator

Will be resolved by this: #32857

@eyurtsev eyurtsev closed this Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to the package `langchain-core` waiting-on-author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants