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

Remove "u" flag intentionally #4191

Merged
merged 2 commits into from
Mar 3, 2022
Merged

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Mar 2, 2022

Fixes #4190.

Changelog Entry

Fixed

  • Fixes #4190. Recent Markdown curly bracket fix should not break IE11 due to unsupported "u" flag in RegExp, by @compulim, in PR #4191

Description

Remove "u" flag used in new RegExp. We can keep "u" flag used in /abc/ constructs as they will be removed by Babel.

Design

"u" flag is required in this case:

/^[😀]$/.test('😀'); // return false
/^[😀]$/u.test('😀'); // return true

Specific Changes

  • Modify packages/bundle/renderMarkdown.html to remove "u" flag in new RegExp
  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@compulim compulim added the p0 Must Fix. Release-blocker label Mar 2, 2022
@compulim compulim marked this pull request as ready for review March 2, 2022 23:40
Copy link
Member

@cwhitten cwhitten left a comment

Choose a reason for hiding this comment

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

Looks good to me when green

@compulim compulim merged commit 39be6e1 into microsoft:main Mar 3, 2022
@compulim compulim deleted the fix-ie11-regexp branch March 3, 2022 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p0 Must Fix. Release-blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RegExp from Markdown curly brackets PR should not break IE11
2 participants