Indentation in front of HTML block crashes WYSIWYG editor
jadham2 opened this issue · comments
Jude Adham commented
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:
- Enter Markdown mode
- Type any HTML tag with 1-3 spaces in front of it
- 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"