sstur / draft-js-utils

DraftJS: import/export ContentState to and from HTML/Markdown
ISC License
883 stars 233 forks source link

Article does not show up in Safari #260

Open yuxin1234 opened 2 years ago

yuxin1234 commented 2 years ago

Article does not show up in Safari, while it works fine in Chrome and Edge. The error is "Invalid regular expression: invalid group specifier name"

Root cause: Safari doesn't support regex lookbehind. https://stackoverflow.com/questions/51568821/works-in-chrome-but-breaks-in-safari-invalid-regular-expression-invalid-group

yuxin1234 commented 2 years ago

@sstur could you please add me as a contributor to the repo? I'll create a PR to fix the issue.

sstur commented 2 years ago

Hey @yuxin1234, thanks for offering to help. I believe you can make a PR without any special access, let me know if you run into any issues.

BTW, I think this issue was caused by #254, so feel free to make a PR to revert that, or if you have a solution that preserves the italic fix, even better. Thanks!

sstur commented 2 years ago

Note: this issue was previously being tracked in #255.

yuxin1234 commented 2 years ago

@sstur Thanks. I have a fix that preserves the italic fix. I got this error when I did git push. git push --set-upstream origin fixSafariDisplay remote: Permission to sstur/draft-js-utils.git denied to yuxin1234. fatal: unable to access 'https://github.com/sstur/draft-js-utils.git/': The requested URL returned error: 403 Please help. Thank you.

sstur commented 2 years ago

Right. When making a PR to a public/open-source repo you'll need to fork it first.

sstur commented 2 years ago

More details here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

yuxin1234 commented 2 years ago

@sstur Thanks. My first time contributing to a public repo. Will follow the instructions.

yuxin1234 commented 2 years ago

@sstur Please review https://github.com/sstur/draft-js-utils/pull/261. Thank you.