Skip to content
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

Fix regex mismatch in text block #1597

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

mfarhan943
Copy link
Contributor

@mfarhan943 mfarhan943 commented Jan 20, 2025

Description

This PR resolve issue in text components where the save button became unresponsive after making changes. The problem was caused by a mismatch in the regular expressions used to match specific patterns. One pattern, @asset+block/, ended with a /, while the other, @asset+block@, ended with an @.

Supporting information

https://2u-internal.atlassian.net/browse/TNL-11741?atlOrigin=eyJpIjoiOWFjZDgwYzhjOWI3NGQ3NDk1MjIyMDgyNmRhNjQ0OTYiLCJwIjoiaiJ9

Testing instructions

  1. Open a course.
  2. Add a new Text component.
  3. Select the text in popup.
  4. Edit the component in the frontend-app-authoring interface.
  5. Use the Insert/Edit Link button to add the link /asset-v1:olaX+abc99+101+type@[email protected].
  6. Save the component.
  7. Verify that the URL is added without any errors.

@mfarhan943 mfarhan943 requested a review from a team as a code owner January 20, 2025 11:19
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.24%. Comparing base (fd6a6dd) to head (c223431).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1597      +/-   ##
==========================================
- Coverage   93.25%   93.24%   -0.01%     
==========================================
  Files        1100     1100              
  Lines       21794    21795       +1     
  Branches     4701     4701              
==========================================
  Hits        20323    20323              
- Misses       1399     1407       +8     
+ Partials       72       65       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@schenedx schenedx left a comment

Choose a reason for hiding this comment

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

👍

@schenedx schenedx merged commit 31f39cb into openedx:master Jan 30, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants