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

Convert newlines between inline elements to a space #3983

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Commits on Jan 31, 2024

  1. Convert newlines between inline elements to a space

    At the moment, if you paste the following HTML, the newline between the
    `<span>` elements is incorrectly discarded.
    
    ```html
    <span>foo</span>
    <span>bar</span>
    ```
    
    This will currently insert `foobar` into Quill, when we'd expect
    `foo bar`, since newlines should [treated as spaces][1] between inline
    elements (such as `<span>`).
    
    This change updates the `matchText()` clipboard matcher to check if the
    text node is between inline elements or not before early-returning.
    
    [1]: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Whitespace
    alecgibson authored and luin committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    f777637 View commit details
    Browse the repository at this point in the history