Skip to content

Whitespace between elements leads to duplication and deletion of text nodes #1191

Description

@NTsch

Certain whitespace is not recognized as such by the editor. For example, the following XML is fine:

<cei:tenor><cei:pTenor>paragraph with text</cei:pTenor>text after paragraph</cei:tenor>

However, if a space or line break is introduced between the opening tags ...

<cei:tenor> <cei:pTenor>paragraph with text</cei:pTenor>text after paragraph</cei:tenor>

... this is not recognized as a text node by the editor window, but is recognized for the counting of the contextId in updateTextNode (if I interpret this correctly). As a result, any change to 'text after paragraph' is inserted into this empty node:

<cei:tenor>text after paragraph 123<cei:pTenor>paragraph with text</cei:pTenor>text after paragraph</cei:tenor>

This is not specific to any element, and appears to happen wherever there is mixed content with whitespace between mixed element tags.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions