fix(editor): ensure anchor does not include variable - #1588
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
WalkthroughHeading slug generation now excludes valid variable nodes from normal heading text while preserving separators. For headings with no remaining text, the generator uses variable names as fallback slug content. Duplicate fallback slugs receive suffixes. Tests cover MDX and legacy variables, JSX variables, numeric and underscore names, invalid hyphenated expressions, and deduplication across different variables. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
__tests__/transformers/mdxish-heading-slugs.test.tsOops! Something went wrong! :( ESLint: 8.57.1 Error: Error while loading rule ' Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related to -> https://github.com/readmeio/readme/pull/20277
🎯 What does this PR do?
{user.name}) and legacy (<<name>>) custom variables from generated heading anchors, keeping anchors stable regardless of variable values.🧪 QA tips
npm test -- __tests__/transformers/mdxish-heading-slugs.test.ts --run.## Hello {user.name}and## Hello <<name>>generatehello-.📸 Screenshot or Loom