Skip to content

Striping whitespace (e.g. not respecting xml:space="preserve") #47

@mririgoyen

Description

@mririgoyen

jxon is stripping white space from XML content, especially ones explicitly with the xml:space="preserve" attribute when going from stringToJs.

Example:

<w:r>
  <w:t>Reactful</w:t>
</w:r>
<w:r>
  <w:t xml:space="preserve"> Word</w:t>
</w:r>
"w:r": [
  {
    "w:t": "Reactful"
  },
  {
    "w:t": {
      "$xml:space": "preserve",
      "_": "Word"
    }
  }
]

Notice the space before "Word" being stripped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions