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

Indentation in front of HTML block crashes WYSIWYG editor #3217

Open
jadham2 opened this issue Jan 18, 2024 · 0 comments
Open

Indentation in front of HTML block crashes WYSIWYG editor #3217

jadham2 opened this issue Jan 18, 2024 · 0 comments
Labels

Comments

@jadham2
Copy link

jadham2 commented Jan 18, 2024

Describe the bug

CommonMark specification and GFM specification specifies that start conditions for HTML blocks can be indented by up to three spaces. after >= 4 spaces, it becomes a code block (correct behavior). The current regex for reHTMLTag only looks at tags immediately starting on a line. This causes it to crash when displaying in WYSIWYG mode since it can not match the tag.

To Reproduce

Steps to reproduce the behavior:

  1. Enter Markdown mode
  2. Type any HTML tag with 1-3 spaces in front of it
  3. Attempt to switch to WYSIWYG mode

Expected behavior

The tag should be matched and treated as a normal HTML tag.

Desktop (please complete the following information):

Browser: Firefox v121.0

Additional context

"@toast-ui/react-editor": "^3.2.3"

@jadham2 jadham2 added the Bug label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant