-
-
Notifications
You must be signed in to change notification settings - Fork 391
Fix language indicator regex in magics #1307
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
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.
@Jiya873 Welcome, and thank you for contributing! We're really happy to see people interested in the project. Left some feedback for you below. 🤗
packages/jupyter-ai-magics/jupyter_ai_magics/tests/test_magics.py
Outdated
Show resolved
Hide resolved
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
changed the code as suggested
@Jiya873 The unit tests are not passing. Can you help reproduce the error locally using |
Thank you for the feedback. I’ll run |
Fixes #1236 by updating the lang_indicator regex in magics.py to correctly detect language specifiers in code blocks. The new pattern ensures that the language name appears immediately after the triple backticks, followed by a space and a newline. This prevents incorrect matches and improves compatibility with markdown syntax.