Skip to content

Issue with CRLF Line Breaks and Improper Element Removal by the destroy Method #177

@unclekitty

Description

@unclekitty
  • Searched existing issues to avoid creating duplicates.

  • Confirmed that it can be reproduced in muya.


Describe the bug
CRLF line breaks are not supported, leading to incorrect display of markdown document content. Additionally, the destroy method does not remove elements with the class mu-float-wrapper, resulting in excessive DOM node initialization and causing the page to freeze.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a markdown document with CRLF line breaks.
  2. Load the document in Muya.
  3. Observe the incorrect display of content.
  4. Call the destroy method and check for remaining elements with the class mu-float-wrapper.

Expected behavior
The content should display correctly without issues related to line breaks. The destroy method should remove all relevant elements from the DOM.

Actual behavior
The content displays incorrectly due to CRLF line breaks, and elements with the class mu-float-wrapper remain in the DOM after destruction, causing performance issues.

Operating System and Browser version (please complete the following information):

  • OS: [e.g. macOS 13.5 (22G74)]
  • Browser: [e.g. Chrome 116.0.5845.110 (arm64)]

Muya Version
e.g: 0.10.11

Screenshots / Screencasts (Optional)
If applicable, add screenshots / screencasts to help explain your problem.

Sample Markdown File (Optional)
Please attach the sample md file that may reproduce this.

Additional context (Optional)
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions