-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
fixes bug in md mdx format adjuster.py #2698
base: develop-postgres
Are you sure you want to change the base?
fixes bug in md mdx format adjuster.py #2698
Conversation
Update talawa_mobile_md_mdx_format_adjuster.py
WalkthroughThe pull request involves modifying the Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
Other🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/talawa_mobile_md_mdx_format_adjuster.py (1)
79-79
: Document the rationale for disabling MDX character escapingThe removal of this processing step should be documented in the code. Please add a comment explaining:
- Why the MDX character escaping was removed
- How special characters are expected to be handled now
- Any potential impact on the documentation pipeline
- # content = escape_mdx_characters(content) + # MDX character escaping removed because: + # <explanation of why it's no longer needed and how special characters are handled>
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/talawa_mobile_md_mdx_format_adjuster.py
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Testing codebase
- GitHub Check: Testing build for iOS
- GitHub Check: Testing build for android
🔇 Additional comments (2)
.github/workflows/talawa_mobile_md_mdx_format_adjuster.py (2)
Line range hint
21-79
: Add tests to verify documentation processingSince this script is part of the documentation workflow, please add tests to verify:
- The documentation still builds successfully without MDX character escaping
- Special characters in markdown files are handled correctly
- The documentation renders properly in Docusaurus
This will help prevent potential regressions in the documentation pipeline.
Would you like me to help create a test plan or open a GitHub issue to track this task?
21-42
: Verify if removing MDX character escaping is intentionalThe removal of the
escape_mdx_characters
function might lead to MDX parsing errors if special characters (<, >, {, }) appear in the documentation. Since this function was specifically designed for Docusaurus v3 compatibility, please:
- Confirm if this removal is the intended fix for issue Bug Report: talawa_mobile_md_mdx_format_adjuster.script escapes HTML tags in markdown file. #2685
- Verify if these special characters are being handled differently now
- Test the documentation build to ensure no MDX parsing errors occur
✅ Verification successful
Removal of MDX character escaping is the correct fix
The removal of
escape_mdx_characters
function is the intended fix for issue #2685. The function was incorrectly escaping HTML tags and type parameters in the documentation, which prevented proper rendering in Docusaurus. These special characters are part of valid documentation syntax and should not be escaped.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for potential MDX parsing issues in markdown files # Look for unescaped special characters in .md files that might cause MDX parsing errors echo "Checking for potential MDX parsing issues..." # Search for unescaped special characters in markdown files rg --type md '(?<!\\)[<>{}]' || echo "No unescaped special characters found"Length of output: 432
Script:
#!/bin/bash # Get issue details and search for MDX-related files and patterns # Fetch issue details echo "=== Issue #2685 Details ===" gh issue view 2685 || echo "Unable to fetch issue" echo -e "\n=== Searching for MDX special characters ===" # Search with simpler patterns and PCRE2 rg --pcre2 '[<>{}]' --type md || echo "No special characters found" echo -e "\n=== Checking for documentation config ===" fd -e json -e js docusaurus || echo "No Docusaurus config found"Length of output: 80266
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #2698 +/- ##
=================================================
Coverage 96.55% 96.55%
=================================================
Files 189 189
Lines 9994 9994
=================================================
Hits 9650 9650
Misses 344 344 ☔ View full report in Codecov by Sentry. |
@IITI-tushar Please do not assign reviewers when submitting a PR, as mentioned in the github action message above: Reviewers comments in this PR or |
@IITI-tushar Please attach a screenshot or video. |
@noman2002 look at this commit commit made by Sir Peter Harrison @palisadoes when he comment out the script. Then i asked @gautam-divyanshu to run the workflow and he has done this commit commit-by-divyanshu in which the issue get solved. |
What kind of change does this PR introduce?
bugfix
Issue Number:#2685
Fixes #2685
Did you add tests for your changes?
Snapshots/Videos:
If relevant, did you update the documentation?
Summary
Does this PR introduce a breaking change?
Other information
Have you read the contributing guide?
yes
Summary by CodeRabbit