loopbackio / loopbackio/strong-soap
Why the method text.trim() is used on all parser.textNode values in ontext method?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 410
- Forks
- 162
- Avg merge
- 4h 36m
- Merged PRs (30d)
- 7
Description
In soap response there are whitespaces in element content.
I want them to be preserved, but from the code in strong-soap it seems that the text.trim() method is hardcoded.
It does not accept any options.
Specifically I have an element like this and i need the multiple whitespace to be preserved:
` `
/src/parser/xmlHandler.js:
`p.ontext = function(text) {
text = text && text.trim();
if (!text.length)
return;
...
}`
Thanks for your reply.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in /src/parser/xmlHandler.js at the ontext handler and trace how parser.textNode values are processed. Check existing parser tests or related XML handling to determine the expected behavior, then add coverage showing whether whitespace is preserved and verify the chosen behavior with the test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100